Skip to content

Commit

Permalink
Update cmd/cloud.go
Browse files Browse the repository at this point in the history
Co-authored-by: Joan López de la Franca Beltran <[email protected]>
  • Loading branch information
oleiade and joanlopez authored Jul 23, 2024
1 parent e8c8928 commit 52f236c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ func exactCloudArgs() cobra.PositionalArgs {
return fmt.Errorf(baseErrMsg + "; " + "received no arguments")
}

hasSubcommand := len(args) >= 1 && (args[0] == "run" || args[0] == "login")
if !hasSubcommand {
hasSubcommand := args[0] == "run" || args[0] == "login"
if len(args) > 1 && !hasSubcommand {
return fmt.Errorf(
baseErrMsg+"; "+"received %d arguments %q, and none of them is a subcommand",
len(args), strings.Join(args, " "),
Expand Down

0 comments on commit 52f236c

Please sign in to comment.