mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 08:02:36 +09:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -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))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user