Skip to content

Commit cde6079

Browse files
scottaglialafriks
authored andcommitted
Restore IsWindows variable assignment (#6722) (#6790)
Signed-off-by: Nicola Scattaglia <[email protected]>
1 parent d29d97d commit cde6079

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/setting/setting.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"os/exec"
1717
"path"
1818
"path/filepath"
19+
"runtime"
1920
"strconv"
2021
"strings"
2122
"time"
@@ -407,6 +408,7 @@ func getWorkPath(appPath string) string {
407408
}
408409

409410
func init() {
411+
IsWindows = runtime.GOOS == "windows"
410412
// We can rely on log.CanColorStdout being set properly because modules/log/console_windows.go comes before modules/setting/setting.go lexicographically
411413
log.NewLogger(0, "console", "console", fmt.Sprintf(`{"level": "trace", "colorize": %t, "stacktraceLevel": "none"}`, log.CanColorStdout))
412414

0 commit comments

Comments
 (0)