diff --git a/pkg/odo/cli/component/list.go b/pkg/odo/cli/component/list.go index 0f567647bec..82098676aaf 100644 --- a/pkg/odo/cli/component/list.go +++ b/pkg/odo/cli/component/list.go @@ -64,6 +64,10 @@ func (lo *ListOptions) Validate() (err error) { var project, app string + if len(lo.Application) != 0 && lo.allAppsFlag { + return odoutil.ThrowContextError() + } + if !util.CheckKubeConfigExist() { project = lo.LocalConfigInfo.GetProject() app = lo.LocalConfigInfo.GetApplication()