From 0a71d857efa6c20db4fe0d96b868d190810e6db9 Mon Sep 17 00:00:00 2001 From: Henri Remonen Date: Sat, 28 Oct 2023 11:07:04 +0300 Subject: [PATCH] feat(Config): Update the config write function --- pkg/config/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 99d631c..cb995ca 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -74,8 +74,10 @@ func ReadConfigFile() (*Config, error) { // WriteConfigFile writes the configuration file to the user's home directory. func WriteConfigFile(config *Config) error { - viper.SetConfigFile(path.Join(UserHomeDir, configFile)) + viper.AddConfigPath(UserHomeDir) viper.SetConfigType("yaml") + viper.SetConfigName(configFile) + viper.Set("commit_types", config.CommitTypes) viper.Set("skip_ci_types", config.SkipCITypes)