Restore IsWindows variable assignment (#6722) (#6790)

Signed-off-by: Nicola Scattaglia <scattaglia.nicola.work@gmail.com>
tokarchuk/v1.17
Nicola Scattaglia 6 years ago committed by Lauris BH
parent d29d97d91c
commit cde6079879
  1. 2
      modules/setting/setting.go

@ -16,6 +16,7 @@ import (
"os/exec" "os/exec"
"path" "path"
"path/filepath" "path/filepath"
"runtime"
"strconv" "strconv"
"strings" "strings"
"time" "time"
@ -407,6 +408,7 @@ func getWorkPath(appPath string) string {
} }
func init() { 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 // 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)) log.NewLogger(0, "console", "console", fmt.Sprintf(`{"level": "trace", "colorize": %t, "stacktraceLevel": "none"}`, log.CanColorStdout))

Loading…
Cancel
Save