From 79a2745b4af3420d154a28d64c5db65ec2ec363b Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 22 Dec 2016 00:27:45 -0500 Subject: Set ProdMode in the correct place Closes #3696, #3611 Previously, ProdMode can only be true for web server, which always prints dev mode log message to incoming SSH connections and leaks unexpected information. --- routers/install.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'routers') diff --git a/routers/install.go b/routers/install.go index 0c621e28..06acb264 100644 --- a/routers/install.go +++ b/routers/install.go @@ -38,12 +38,10 @@ const ( ) func checkRunMode() { - switch setting.Cfg.Section("").Key("RUN_MODE").String() { - case "prod": + if setting.ProdMode { macaron.Env = macaron.PROD macaron.ColorLog = false - setting.ProdMode = true - default: + } else { git.Debug = true } log.Info("Run Mode: %s", strings.Title(macaron.Env)) -- cgit v1.2.3