fix(os): lowercase OS name

resolves #1593
This commit is contained in:
Jan De Dobbeleer 2022-01-16 19:30:22 +01:00 committed by Jan De Dobbeleer
parent f653fb46e5
commit a56b90005f
2 changed files with 3 additions and 2 deletions

View file

@ -2,6 +2,7 @@ package main
import (
"fmt"
"strings"
)
type osInfo struct {
@ -84,7 +85,7 @@ func (n *osInfo) string() string {
n.os = p
return n.getDistroName(p, "")
}
n.os = wsl
n.os = strings.ToLower(wsl)
return fmt.Sprintf("%s%s%s",
n.props.getString(WSL, "WSL"),
n.props.getString(WSLSeparator, " - "),

View file

@ -62,7 +62,7 @@ func (c *Context) init(t *textTemplate) {
wsl := t.Env.getenv("WSL_DISTRO_NAME")
goos = t.Env.getPlatform()
if len(wsl) != 0 {
goos = wsl
goos = strings.ToLower(wsl)
}
}
c.OS = goos