summaryrefslogtreecommitdiffstats
path: root/modules/setting
diff options
context:
space:
mode:
authorNicola Scattaglia <scattaglia.nicola@gmail.com>2019-04-28 21:48:46 +0200
committerLauris BH <lauris@nix.lv>2019-04-28 22:48:46 +0300
commitcde6079879a5229e934685e08f78137567daf1f7 (patch)
treec59ad69eb00aeb8d6daa30e4d31bf3c71538be6e /modules/setting
parentd29d97d91cab8b34165ec65b9de3be746312f015 (diff)
downloadgitea-cde6079879a5229e934685e08f78137567daf1f7.tar.gz
gitea-cde6079879a5229e934685e08f78137567daf1f7.zip
Restore IsWindows variable assignment (#6722) (#6790)
Signed-off-by: Nicola Scattaglia <scattaglia.nicola.work@gmail.com>
Diffstat (limited to 'modules/setting')
-rw-r--r--modules/setting/setting.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index ed24d74d96..85fcbac2b1 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -16,6 +16,7 @@ import (
"os/exec"
"path"
"path/filepath"
+ "runtime"
"strconv"
"strings"
"time"
@@ -407,6 +408,7 @@ func getWorkPath(appPath string) string {
}
func init() {
+ IsWindows = runtime.GOOS == "windows"
// We can rely on log.CanColorStdout being set properly because modules/log/console_windows.go comes before modules/setting/setting.go lexicographically
log.NewLogger(0, "console", "console", fmt.Sprintf(`{"level": "trace", "colorize": %t, "stacktraceLevel": "none"}`, log.CanColorStdout))