chore(platform): more logging

This commit is contained in:
Jan De Dobbeleer 2023-02-14 16:10:37 +01:00 committed by Jan De Dobbeleer
parent df783cec5f
commit 22b0704d4a

View file

@ -59,6 +59,7 @@ func (env *Shell) TerminalWidth() (int, error) {
func (env *Shell) Platform() string {
const key = "environment_platform"
if val, found := env.Cache().Get(key); found {
env.Debug(val)
return val
}
var platform string
@ -67,6 +68,7 @@ func (env *Shell) Platform() string {
}()
if wsl := env.Getenv("WSL_DISTRO_NAME"); len(wsl) != 0 {
platform = strings.Split(strings.ToLower(wsl), "-")[0]
env.Debug(platform)
return platform
}
platform, _, _, _ = host.PlatformInformation()