fix(config): should return defaultConfig when config file doesnt exist

This commit is contained in:
Siyuan Miao
2025-02-19 10:24:27 +01:00
parent 5e91cfc7fa
commit a3d21557c3
2 changed files with 5 additions and 2 deletions

View File

@@ -55,6 +55,9 @@ func LoadConfig() {
return
}
// load the default config
config = defaultConfig
file, err := os.Open(configPath)
if err != nil {
logger.Debug("default config file doesn't exist, using default")