From a38fb10cdf948322587948742fcc312e533c3c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cz=C3=A9kus=20M=C3=A1t=C3=A9?= Date: Mon, 23 Sep 2024 21:02:48 +0200 Subject: [PATCH] fix: xdg home default + use supplied param in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: kovapatrik Signed-off-by: Czékus Máté --- cmd/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 18e462ce..e2bec0b7 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -138,7 +138,7 @@ func useEnvironmentConfiguration() { viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) } func useUserSuppliedConfigFile(configFilePath string) error { - viper.SetConfigFile(os.ExpandEnv(configFile)) + viper.SetConfigFile(os.ExpandEnv(configFilePath)) return viper.ReadInConfig() } @@ -146,7 +146,7 @@ func useUserSuppliedConfigFile(configFilePath string) error { func getXdgConfigHome() string { xdgConfigHome, exists := os.LookupEnv("XDG_CONFIG_HOME") if !exists { - xdgConfigHome = os.Getenv("HOME") + "/.config/vacuum.conf.yaml" + xdgConfigHome = os.Getenv("HOME") + "/.config" } return xdgConfigHome }