Skip to content

Commit

Permalink
Warn if --app and --all-apps coexist
Browse files Browse the repository at this point in the history
  • Loading branch information
jichenjc committed Jun 15, 2020
1 parent 6cbe763 commit c8d0d56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/odo/cli/component/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ func (lo *ListOptions) Validate() (err error) {

var project, app string

if len(lo.Application) != 0 && lo.allAppsFlag {
klog.V(4).Infof("either --app and --all-apps both provided or provided --all-apps in a folder has app, use --all-apps anyway")
}

if !util.CheckKubeConfigExist() {
project = lo.LocalConfigInfo.GetProject()
app = lo.LocalConfigInfo.GetApplication()
Expand Down

0 comments on commit c8d0d56

Please sign in to comment.