mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-28 20:39:40 -08:00
fix(wsl): get correct distro name
This commit is contained in:
parent
2ff5b87f97
commit
0f489ec88e
|
@ -65,8 +65,8 @@ func (env *ShellEnvironment) Platform() string {
|
||||||
env.Cache().Set(key, platform, -1)
|
env.Cache().Set(key, platform, -1)
|
||||||
}()
|
}()
|
||||||
if wsl := env.Getenv("WSL_DISTRO_NAME"); len(wsl) != 0 {
|
if wsl := env.Getenv("WSL_DISTRO_NAME"); len(wsl) != 0 {
|
||||||
platform = strings.ToLower(wsl)
|
platform = strings.Split(strings.ToLower(wsl), "-")[0]
|
||||||
return strings.Split(platform, "-")[0]
|
return platform
|
||||||
}
|
}
|
||||||
platform, _, _, _ = host.PlatformInformation()
|
platform, _, _, _ = host.PlatformInformation()
|
||||||
if platform == "arch" {
|
if platform == "arch" {
|
||||||
|
|
Loading…
Reference in a new issue