We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 816f07d + 1aead15 commit 2ae15e7Copy full SHA for 2ae15e7
cmd/root.go
@@ -2,6 +2,7 @@ package cmd
2
3
import (
4
"github.com/spf13/cobra"
5
+ "os"
6
)
7
8
var rootCmd = &cobra.Command{
@@ -13,6 +14,10 @@ func init() {
13
14
rootCmd.AddCommand(NewVerifyCommand())
15
}
16
-func Execute() error {
17
- return rootCmd.Execute()
+func Execute() {
18
+ // cobra does not exit with a non-zero return code when failing
19
+ // solution from https://github.com/spf13/cobra/issues/221
20
+ if err := rootCmd.Execute(); err != nil {
21
+ os.Exit(1)
22
+ }
23
0 commit comments