diff --git a/src/Application/AppConfig.psm1 b/src/Application/AppConfig.psm1 index 97401c7..a56c6a8 100644 --- a/src/Application/AppConfig.psm1 +++ b/src/Application/AppConfig.psm1 @@ -13,7 +13,10 @@ Class AppConfig : JsonHashtableFile if (-Not $this.ContainsKey("appData")) { - $this.Add("appData", [FileUtils]::joinPath($env:LOCALAPPDATA, "Wslctl") ) + if (($null -ne $env:WSLCTL) -And (Test-Path -Path $env:WSLCTL)) { $this.Add("appData", $env:WSLCTL); } + else { + $this.Add("appData", [FileUtils]::joinPath($env:LOCALAPPDATA, "Wslctl") ) + } } }