fix(wsl): split distro name from version

resolves #1766
This commit is contained in:
Jan De Dobbeleer 2022-02-17 12:41:50 +01:00 committed by Jan De Dobbeleer
parent cc1da3f0ea
commit b4eadff3b6

View file

@ -66,7 +66,7 @@ func (env *ShellEnvironment) Platform() string {
}()
if wsl := env.Getenv("WSL_DISTRO_NAME"); len(wsl) != 0 {
platform = strings.ToLower(wsl)
return platform
return strings.Split(platform, "-")[0]
}
platform, _, _, _ = host.PlatformInformation()
if platform == "arch" {