From 0f489ec88e3407781418b56c323c54b3c4e29cca Mon Sep 17 00:00:00 2001 From: "L. Yeung" Date: Sat, 19 Mar 2022 03:40:40 +0800 Subject: [PATCH] fix(wsl): get correct distro name --- src/environment/unix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/environment/unix.go b/src/environment/unix.go index 01fe5994..de475adc 100644 --- a/src/environment/unix.go +++ b/src/environment/unix.go @@ -65,8 +65,8 @@ func (env *ShellEnvironment) Platform() string { env.Cache().Set(key, platform, -1) }() if wsl := env.Getenv("WSL_DISTRO_NAME"); len(wsl) != 0 { - platform = strings.ToLower(wsl) - return strings.Split(platform, "-")[0] + platform = strings.Split(strings.ToLower(wsl), "-")[0] + return platform } platform, _, _, _ = host.PlatformInformation() if platform == "arch" {