🐛 fix: config file reading logic error

This commit is contained in:
MartialBE 2024-05-29 14:55:53 +08:00
parent dbb1b5ebec
commit 8f77924946
No known key found for this signature in database
GPG Key ID: 27C0267EC84B0A5C

View File

@ -45,8 +45,8 @@ func InitCli() {
os.Exit(0)
}
if Config != nil && !utils.IsFileExist(*Config) {
panic("Config file not found")
if !utils.IsFileExist(*Config) {
return
}
viper.SetConfigFile(*Config)