Browse Source

Fix #145

for-closed-social
Unknown 10 years ago
parent
commit
07c3d497a7
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      modules/base/conf.go

+ 6
- 4
modules/base/conf.go View File

@ -316,10 +316,12 @@ func NewConfigContext() {
}
Cfg.BlockMode = false
cfgPath = filepath.Join(workDir, "custom/conf/app.ini")
if com.IsFile(cfgPath) {
if err = Cfg.AppendFiles(cfgPath); err != nil {
qlog.Fatalf("Cannot load config file(%s): %v\n", cfgPath, err)
cfgPaths := []string{os.Getenv("GOGS_CONFIG"), filepath.Join(workDir, "custom/conf/app.ini")}
for _, cfgPath := range cfgPaths {
if com.IsFile(cfgPath) {
if err = Cfg.AppendFiles(cfgPath); err != nil {
qlog.Fatalf("Cannot load config file(%s): %v\n", cfgPath, err)
}
}
}

Loading…
Cancel
Save