From 8f779249462844be3fb33c16d78a10decd0ff3ae Mon Sep 17 00:00:00 2001 From: MartialBE Date: Wed, 29 May 2024 14:55:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20config=20file=20reading?= =?UTF-8?q?=20logic=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/flag.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/flag.go b/cli/flag.go index 2dcfd5a3..2a324d8d 100644 --- a/cli/flag.go +++ b/cli/flag.go @@ -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)