Skip to content

Commit

Permalink
explicitly ignore error if showing help fails
Browse files Browse the repository at this point in the history
  • Loading branch information
ydkn committed May 8, 2019
1 parent 11d3b21 commit 17be2df
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
handlerConfig = &handler.Config{}
)

// eventCmd represents the event command
// eventCmd represents the "event" command
var eventCmd = &cobra.Command{
Use: "event",
Short: "Handle event data",
Expand Down
2 changes: 1 addition & 1 deletion cmd/redmine.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var (
redmineToken string
)

// redmineCmd represents the redmine command
// redmineCmd represents the "redmine" command
var redmineCmd = &cobra.Command{
Use: "redmine",
Short: "Redmine related commands",
Expand Down
2 changes: 1 addition & 1 deletion cmd/redmineImport.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sensu-sic-handler/redmine"
)

// redmineImportCmd represents the redmineImport command
// redmineImportCmd represents the "redmine import" command
var redmineImportCmd = &cobra.Command{
Use: "import",
Short: "Import recipients from redmine",
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func intValueFromEnvWithDefault(env string, defaultValue int) int {
}

func terminateWithHelpAndMessage(cmd *cobra.Command, msg string) {
cmd.Help()
_ = cmd.Help()

fmt.Fprintln(os.Stderr, "")
fmt.Fprintln(os.Stderr, msg)
Expand Down

0 comments on commit 17be2df

Please sign in to comment.