Flip RUN_MODE detection in router (#13768)

Missed that part in https://github.com/go-gitea/gitea/pull/13765. It's
already in the 1.13 backport so this forward-ports that change again.
tokarchuk/v1.17
silverwind 4 years ago committed by GitHub
parent bc455ed257
commit 14e8ef9ecb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      routers/init.go

@ -43,13 +43,15 @@ import (
) )
func checkRunMode() { func checkRunMode() {
switch setting.Cfg.Section("").Key("RUN_MODE").String() { switch setting.RunMode {
case "prod": case "dev":
git.Debug = true
case "test":
git.Debug = true
default:
macaron.Env = macaron.PROD macaron.Env = macaron.PROD
macaron.ColorLog = false macaron.ColorLog = false
setting.ProdMode = true setting.ProdMode = true
default:
git.Debug = true
} }
log.Info("Run Mode: %s", strings.Title(macaron.Env)) log.Info("Run Mode: %s", strings.Title(macaron.Env))
} }

Loading…
Cancel
Save