Skip to content

Commit

Permalink
Honor devfile if the --devfile has been explicitly on the cli
Browse files Browse the repository at this point in the history
  • Loading branch information
kanchwala-yusuf committed Feb 12, 2020
1 parent d2ccb70 commit 01daee9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/odo/cli/component/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ func (po *PushOptions) Complete(name string, cmd *cobra.Command, args []string)
if experimental.IsExperimentalModeEnabled() {
if cmd.Flags().Changed(devfileFlagName) {
po.devfileFlag = true
return nil
} else {
po.devfileFlag = false
}
return nil
}

conf, err := config.NewLocalConfigInfo(po.componentContext)
Expand Down Expand Up @@ -98,7 +98,9 @@ func (po *PushOptions) Complete(name string, cmd *cobra.Command, args []string)
// Validate validates the push parameters
func (po *PushOptions) Validate() (err error) {

if experimental.IsExperimentalModeEnabled() {
// if experimental flag is set and `--devfile` has been explicitly done,
// then do nothing for now
if experimental.IsExperimentalModeEnabled() && po.devfileFlag {
return nil
}

Expand Down

0 comments on commit 01daee9

Please sign in to comment.