Skip to content

Commit

Permalink
fix "bin help" command
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Lilljedahl <[email protected]>
  • Loading branch information
marcosnils committed Apr 25, 2023
1 parent d1213c1 commit 2d0b198
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ func defaultCommand(cmd *cobra.Command, args []string) bool {
return false
}

// if we have != 1 args, assume its a ls
if len(args) != 1 {
// if we have == 0 args, assume its a ls
if len(args) == 0 {
return true
}

// given that its 1, check if its one of the valid standalone flags
// for the root cmd
for _, s := range []string{"-h", "--help", "-v", "--version"} {
for _, s := range []string{"-h", "--help", "-v", "--version", "help"} {
if s == args[0] {
// if it is, we should run the root cmd
return false
Expand Down

0 comments on commit 2d0b198

Please sign in to comment.