From 340a556c4fda23e4e601fbf9508af877db4fdb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Palet?= Date: Tue, 2 Apr 2024 10:42:13 +0100 Subject: [PATCH] Only write to config file when needed --- internal/pkg/config/config.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go index b94b82127..d5fb213b9 100644 --- a/internal/pkg/config/config.go +++ b/internal/pkg/config/config.go @@ -87,11 +87,6 @@ func InitConfig() { cobra.CheckErr(err) setConfigDefaults() - err = viper.WriteConfigAs(configFilePath) - cobra.CheckErr(err) - - // Needs to be done after WriteConfigAs, otherwise it would write - // the environment variables to the config file viper.AutomaticEnv() viper.SetEnvPrefix("stackit") }