summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routers/init.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/routers/init.go b/routers/init.go
index 6434fa89ba..6f6c1cfcd6 100644
--- a/routers/init.go
+++ b/routers/init.go
@@ -43,13 +43,15 @@ import (
)
func checkRunMode() {
- switch setting.Cfg.Section("").Key("RUN_MODE").String() {
- case "prod":
+ switch setting.RunMode {
+ case "dev":
+ git.Debug = true
+ case "test":
+ git.Debug = true
+ default:
macaron.Env = macaron.PROD
macaron.ColorLog = false
setting.ProdMode = true
- default:
- git.Debug = true
}
log.Info("Run Mode: %s", strings.Title(macaron.Env))
}