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.
1 parent 46f5811 commit 33e57beCopy full SHA for 33e57be
main.go
@@ -56,8 +56,5 @@ func main() {
56
return color + abbrev + "\033[0m"
57
},
58
})
59
- err := cmd.Execute()
60
- if err != nil {
61
- os.Exit(1)
62
- }
+ cmd.Execute()
63
}
packages/cmd/root.go
@@ -30,8 +30,11 @@ var rootCmd = &cobra.Command{
30
31
// Execute adds all child commands to the root command and sets flags appropriately.
32
// This is called by main.main(). It only needs to happen once to the rootCmd.
33
-func Execute() error {
34
- return rootCmd.Execute()
+func Execute() {
+ err := rootCmd.Execute()
35
+ if err != nil {
36
+ os.Exit(1)
37
+ }
38
39
40
func ExecuteContext(ctx context.Context) error {
0 commit comments