Skip to content

Commit

Permalink
fix. default command, fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
w-devin committed Jul 6, 2024
1 parent 9104f58 commit 99531f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (c *Command) Run(cCtx *Context, arguments ...string) (err error) {
}
}
}
if !hasGavenCommand {
if !hasGavenCommand && cCtx.App.DefaultCommand != "" {
arguments = append([]string{arguments[0], cCtx.App.DefaultCommand}, arguments[1:]...)
}

Expand Down

0 comments on commit 99531f1

Please sign in to comment.