Skip to content

Commit

Permalink
Error when json output and no flags
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Apr 14, 2022
1 parent d3f48ee commit dc034e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/odo/cli/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ func (o *InitOptions) Validate() error {
if err != nil {
return err
}

if len(o.flags) == 0 && log.IsJSON() {
return errors.New("parameters are expected to select a devfile")
}
return nil
}

Expand Down

0 comments on commit dc034e1

Please sign in to comment.