feat(pwsh): allow POSH_PATH override

resolves #1919
This commit is contained in:
Jan De Dobbeleer 2022-03-14 12:50:00 +01:00 committed by Jan De Dobbeleer
parent dcc2080047
commit d796ff166e

View file

@ -19,6 +19,9 @@ function Get-CachePath {
} }
function Set-PoshRootPath { function Set-PoshRootPath {
if ($env:POSH_PATH) {
return
}
$path = Get-CachePath -Path $env:LOCALAPPDATA $path = Get-CachePath -Path $env:LOCALAPPDATA
if ($path) { if ($path) {
$env:POSH_PATH = $path $env:POSH_PATH = $path