Skip to content

Commit

Permalink
add: 如果不是 web 项目, 允许没有.env 文件
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-home committed Aug 16, 2024
1 parent 25898fd commit e3cb2ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap/providers/config_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (c *ConfigProvider) initFile() {
dirs, _ := filepath.Abs(checkDir + "/" + defaultDir)
DirEntry, err = os.ReadDir(dirs)
if err != nil {
// panic(err) // 如果不是 web 项目, 允许有.env 文件
// panic(err) // 如果不是 web 项目, 允许没有.env 文件
}
// checkDir as root
_ = godotenv.Load(checkDir + "/.env")
Expand Down

0 comments on commit e3cb2ab

Please sign in to comment.