remove printing err when running root command (#615)

This commit is contained in:
Daniel Helfand 2020-01-21 12:58:05 -05:00 committed by Knative Prow Robot
parent de7e3880d4
commit a56afabc8a
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@ func main() {
rand.Seed(time.Now().UnixNano())
err = core.NewDefaultKnCommand().Execute()
if err != nil {
fmt.Fprintln(os.Stderr, err)
if err.Error() != "subcommand is required" {
fmt.Fprintln(os.Stderr, err)
}
os.Exit(1)
}
}