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 ( import (
"fmt" "fmt"
"strings"
) )
type osInfo struct { type osInfo struct {
@ -84,7 +85,7 @@ func (n *osInfo) string() string {
n.os = p n.os = p
return n.getDistroName(p, "") return n.getDistroName(p, "")
} }
n.os = wsl n.os = strings.ToLower(wsl)
return fmt.Sprintf("%s%s%s", return fmt.Sprintf("%s%s%s",
n.props.getString(WSL, "WSL"), n.props.getString(WSL, "WSL"),
n.props.getString(WSLSeparator, " - "), n.props.getString(WSLSeparator, " - "),

View file

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