From e35e49577da10c89f70c7969a6b008aaf5608a4d Mon Sep 17 00:00:00 2001 From: David C Wang Date: Sat, 22 Sep 2018 16:28:46 +0000 Subject: [PATCH] Fix version check race condition --- cmd/kdk/kdk.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kdk/kdk.go b/cmd/kdk/kdk.go index 266d57e..65c0076 100644 --- a/cmd/kdk/kdk.go +++ b/cmd/kdk/kdk.go @@ -55,8 +55,6 @@ func init() { cobra.OnInitialize(initConfig) CurrentKdkEnvConfig.Init() - kdk.WarnIfUpdateAvailable(&CurrentKdkEnvConfig) - rootCmd.PersistentFlags().StringVar(&CurrentKdkEnvConfig.ConfigFile.AppConfig.Name, "name", "kdk", "KDK name") rootCmd.PersistentFlags().BoolVarP(&debug, "debug", "d", false, "Debug Mode") } @@ -99,4 +97,6 @@ func initConfig() { log.Fatal("Please rebuild config file with `kdk init`") } } + + kdk.WarnIfUpdateAvailable(&CurrentKdkEnvConfig) }