mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
chore(platform): more logging
This commit is contained in:
parent
df783cec5f
commit
22b0704d4a
|
@ -59,6 +59,7 @@ func (env *Shell) TerminalWidth() (int, error) {
|
||||||
func (env *Shell) Platform() string {
|
func (env *Shell) Platform() string {
|
||||||
const key = "environment_platform"
|
const key = "environment_platform"
|
||||||
if val, found := env.Cache().Get(key); found {
|
if val, found := env.Cache().Get(key); found {
|
||||||
|
env.Debug(val)
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
var platform string
|
var platform string
|
||||||
|
@ -67,6 +68,7 @@ func (env *Shell) Platform() string {
|
||||||
}()
|
}()
|
||||||
if wsl := env.Getenv("WSL_DISTRO_NAME"); len(wsl) != 0 {
|
if wsl := env.Getenv("WSL_DISTRO_NAME"); len(wsl) != 0 {
|
||||||
platform = strings.Split(strings.ToLower(wsl), "-")[0]
|
platform = strings.Split(strings.ToLower(wsl), "-")[0]
|
||||||
|
env.Debug(platform)
|
||||||
return platform
|
return platform
|
||||||
}
|
}
|
||||||
platform, _, _, _ = host.PlatformInformation()
|
platform, _, _, _ = host.PlatformInformation()
|
||||||
|
|
Loading…
Reference in a new issue