Add SkipVersionCheck flag
@@ -39,6 +39,7 @@ type GlobalFlags struct {
Network string
Yes bool
ConfigPaths []string
+ SkipVersionCheck bool
}
// Flags initialized to default values.
@@ -52,6 +53,7 @@ var Flags = GlobalFlags{
Log: logLevelInfo,
Yes: false,
ConfigPaths: config.DefaultPaths(),
+ SkipVersionCheck: false,
}
// InitFlags init all the global persistent flags.
@@ -127,6 +129,14 @@ func InitFlags(cmd *cobra.Command) {
Flags.Yes,
"Approve any prompts",
)
+
+ cmd.PersistentFlags().BoolVarP(
+ &Flags.SkipVersionCheck,
+ "skip-check",
+ "",
+ Flags.SkipVersionCheck,
+ "Skip version check during start up",
+ )
}
// bindFlags bind all the flags needed.
