Skip to content

Commit

Permalink
go/oasis-test-runner/cmd: Don't print error messages twice
Browse files Browse the repository at this point in the history
Previously, Execute() called nodeCommon.EarlyLogAndExit() if there was
an error running rootCmd.Execute() which in turn printed the error to
stderr.
The error message is printed to stdout via github.com/spf13/cobra's
ExecuteC() already, so this resulted in the same error message being
printed twice.
  • Loading branch information
tjanez committed Jun 24, 2020
1 parent 83134c2 commit f5f906b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/oasis-test-runner/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func RootCmd() *cobra.Command {
// Execute spawns the main entry point after handing the config file.
func Execute() {
if err := rootCmd.Execute(); err != nil {
nodeCommon.EarlyLogAndExit(err)
os.Exit(1)
}
}

Expand Down

0 comments on commit f5f906b

Please sign in to comment.