Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions command_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ func (cmd *Command) run(ctx context.Context, osArgs []string) (_ context.Context
tracef("using default command args=%[1]q (cmd=%[2]q)", argsWithDefault, cmd.Name)
subCmd = cmd.Command(argsWithDefault.First())
cmd.parsedArgs = argsWithDefault
if !hasDefault && cmd.parsedArgs.Len() > 0 && cmd.parsedArgs.First() == "" {
cmd.parsedArgs = &stringSliceArgs{cmd.parsedArgs.Tail()}
}
}
}
} else if cmd.DefaultCommand != "" {
Expand Down