Removed .minikube folder creation from version command
parent
c4911dc22e
commit
fcc1bdedda
|
@ -84,27 +84,6 @@ var RootCmd = &cobra.Command{
|
||||||
Please use --v=3 to show libmachine logs, and --v=7 for debug level libmachine logs
|
Please use --v=3 to show libmachine logs, and --v=7 for debug level libmachine logs
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO(r2d4): config should not reference API
|
|
||||||
clientType = configCmd.GetClientType()
|
|
||||||
|
|
||||||
// Log level 3 or greater enables libmachine logs
|
|
||||||
if !glog.V(3) {
|
|
||||||
log.SetOutWriter(ioutil.Discard)
|
|
||||||
log.SetErrWriter(ioutil.Discard)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Log level 7 or greater enables debug level logs
|
|
||||||
if glog.V(7) {
|
|
||||||
log.SetDebug(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
if enableUpdateNotification {
|
|
||||||
notify.MaybePrintUpdateTextFromGithub(os.Stderr)
|
|
||||||
}
|
|
||||||
if enableKubectlDownloadMsg {
|
|
||||||
util.MaybePrintKubectlDownloadMsg(runtime.GOOS, os.Stderr)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +122,27 @@ func init() {
|
||||||
}
|
}
|
||||||
viper.BindPFlags(RootCmd.PersistentFlags())
|
viper.BindPFlags(RootCmd.PersistentFlags())
|
||||||
cobra.OnInitialize(initConfig)
|
cobra.OnInitialize(initConfig)
|
||||||
|
|
||||||
|
//TODO(r2d4): config should not reference API
|
||||||
|
clientType = configCmd.GetClientType()
|
||||||
|
|
||||||
|
// Log level 3 or greater enables libmachine logs
|
||||||
|
if !glog.V(3) {
|
||||||
|
log.SetOutWriter(ioutil.Discard)
|
||||||
|
log.SetErrWriter(ioutil.Discard)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Log level 7 or greater enables debug level logs
|
||||||
|
if glog.V(7) {
|
||||||
|
log.SetDebug(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
if enableUpdateNotification {
|
||||||
|
notify.MaybePrintUpdateTextFromGithub(os.Stderr)
|
||||||
|
}
|
||||||
|
if enableKubectlDownloadMsg {
|
||||||
|
util.MaybePrintKubectlDownloadMsg(runtime.GOOS, os.Stderr)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// initConfig reads in config file and ENV variables if set.
|
// initConfig reads in config file and ENV variables if set.
|
||||||
|
|
|
@ -31,8 +31,6 @@ var versionCmd = &cobra.Command{
|
||||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||||
// Explicitly disable update checking for the version command
|
// Explicitly disable update checking for the version command
|
||||||
enableUpdateNotification = false
|
enableUpdateNotification = false
|
||||||
|
|
||||||
RootCmd.PersistentPreRun(cmd, args)
|
|
||||||
},
|
},
|
||||||
Run: func(command *cobra.Command, args []string) {
|
Run: func(command *cobra.Command, args []string) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue