Skip to content

Commit

Permalink
Flip RUN_MODE detection in router (#13768)
Browse files Browse the repository at this point in the history
Missed that part in #13765. It's
already in the 1.13 backport so this forward-ports that change again.
  • Loading branch information
silverwind authored Dec 1, 2020
1 parent bc455ed commit 14e8ef9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions routers/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 14e8ef9

Please sign in to comment.