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