From c2ccb721a7b79f09219e1dd488ae15c6966d9e03 Mon Sep 17 00:00:00 2001 From: timerzz Date: Mon, 26 Aug 2024 17:19:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E4=BB=8E=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8F=E8=AF=BB=E5=8F=96=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E9=85=8D=E7=BD=AE=E5=87=BA=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/database/init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/database/init.go b/pkg/database/init.go index 83e0939..627a470 100644 --- a/pkg/database/init.go +++ b/pkg/database/init.go @@ -18,7 +18,7 @@ func InitDatabase(opt *DBOption) (*gorm.DB, error) { func InitDefaultDatabase() (*gorm.DB, error) { path := os.Getenv(ConfigPathEnvKey) - if path != "" { + if path == "" { path = DefaultConfigPath } cfg, err := LoadDBConfig(path)