aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/serv.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-01-15 05:17:03 +0800
committerGitHub <noreply@github.com>2021-01-14 23:17:03 +0200
commit84b147c7f0c2575723d3471783cb24078232fe7a (patch)
tree3b7ebea85a9be9deaffceb5e836c8073a604799b /cmd/serv.go
parent60a3297a33b2209ae7acf6fd84afd62e095e01aa (diff)
downloadgitea-84b147c7f0c2575723d3471783cb24078232fe7a.tar.gz
gitea-84b147c7f0c2575723d3471783cb24078232fe7a.zip
Use IsProd instead of testing if it's equal. (#14336)
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'cmd/serv.go')
-rw-r--r--cmd/serv.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/serv.go b/cmd/serv.go
index fb1e581134..1e66cb5111 100644
--- a/cmd/serv.go
+++ b/cmd/serv.go
@@ -58,7 +58,7 @@ func setup(logPath string, debug bool) {
}
setting.NewContext()
if debug {
- setting.ProdMode = false
+ setting.RunMode = "dev"
}
}
@@ -76,7 +76,7 @@ func fail(userMessage, logMessage string, args ...interface{}) {
fmt.Fprintln(os.Stderr, "Gitea:", userMessage)
if len(logMessage) > 0 {
- if !setting.ProdMode {
+ if !setting.IsProd() {
fmt.Fprintf(os.Stderr, logMessage+"\n", args...)
}
}