summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-05 02:49:33 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-05 02:49:33 -0400
commit07c3d497a7cffe12f4dae828dc8bd82980595b3c (patch)
treedd7fc6d1ec13b05f99e9a4b3cae4d27f6676aa67
parent816c0ed5e7bba89a87689e56c19a29617f5f0ea9 (diff)
downloadgitea-07c3d497a7cffe12f4dae828dc8bd82980595b3c.tar.gz
gitea-07c3d497a7cffe12f4dae828dc8bd82980595b3c.zip
Fix #145
-rw-r--r--modules/base/conf.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go
index 126fd63d2e..73552732b1 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -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)
+ }
}
}