From b4eadff3b64f715e305a1ebbf7eb37f8ca4c15c3 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Thu, 17 Feb 2022 12:41:50 +0100 Subject: [PATCH] fix(wsl): split distro name from version resolves #1766 --- src/environment/unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environment/unix.go b/src/environment/unix.go index eeb381f6..448997c6 100644 --- a/src/environment/unix.go +++ b/src/environment/unix.go @@ -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" {