From 035194b6f0ef4d6818b40b7773c7c671923e90fb Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Mon, 6 Jul 2026 09:09:23 +0200 Subject: [PATCH] load -c if exists --- pkg/cfg/config.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/cfg/config.go b/pkg/cfg/config.go index a5aa3cd..aeddbaf 100644 --- a/pkg/cfg/config.go +++ b/pkg/cfg/config.go @@ -121,10 +121,11 @@ func getDefaultPath() string { func (conf *Config) Init() error { DefaultConfig := getDefaultPath() - switch { - case fileExists(DefaultConfig): + if conf.ConfigFile == "" && fileExists(DefaultConfig) { conf.ConfigFile = DefaultConfig - fallthrough + } + + switch { case conf.ConfigFile != "": if err := conf.LoadConfig(); err != nil { return err