提交 6008e1f1 编写于 作者: M Matt Rickard 提交者: GitHub

Merge pull request #1853 from r2d4/return-error-code

Exit with non-zero code on error
......@@ -95,7 +95,10 @@ var RootCmd = &cobra.Command{
// Execute adds all child commands to the root command sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
_ = RootCmd.Execute()
if err := RootCmd.Execute(); err != nil {
os.Exit(1)
}
}
// Handle config values for flags used in external packages (e.g. glog)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册