Remove Error Message from Only Executing Root Command
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
With other cli tools, it is common to be able to execute the root command of the cli to display the help message. `kapp` currently does this, but it displays an error if no subcommand is called:
```
kapp: Error: Invalid command - see available commands/subcommands above
```
Would it make sense to not display this message since running the command is not an error? Maybe adding in something like below to `kapp.go` would help with this to avoid confusion about an error occurring.
```go
hasArgs := len(os.Args) > 1
if err != nil && hasArgs {
confUI.ErrorLinef("kapp: Error: %v", uierrs.NewMultiLineError(err))
return err
}
if hasArgs {
confUI.PrintLinef("Succeeded")
}
```
Contributor guide
Assessment
This issue has not been assessed yet.