Skip to content

Commit

Permalink
avoid redundant error information
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Dec 27, 2018
1 parent a5ebc21 commit 8bcc1c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/fluxctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ func run(args []string) int {
// so we use the cause instead.
if cause, ok := errors.Cause(err).(*fluxerr.Error); ok {
cmd.Println("== Error ==\n\n" + cause.Help)
} else {
cmd.Println("Error: " + err.Error())
cmd.Printf("Run '%v --help' for usage.\n", cmd.CommandPath())
}
cmd.Println("Error: " + err.Error())
cmd.Printf("Run '%v --help' for usage.\n", cmd.CommandPath())
return 1
}
return 0
Expand Down

0 comments on commit 8bcc1c5

Please sign in to comment.