fix(pwsh): validate the cache path

relates to #1833 #1828
This commit is contained in:
Jan De Dobbeleer 2022-02-28 12:51:32 +01:00 committed by Jan De Dobbeleer
parent ca3b9ef955
commit f865f92633

View file

@ -11,7 +11,7 @@ function Get-CachePath {
}
$child = "oh-my-posh"
$cachePath = Join-Path -Path $Path -ChildPath $child
if (Test-Path -Path $Path) {
if (Test-Path -Path $cachePath) {
return $cachePath
}
New-Item -Path $Path -Name $child -ItemType "directory"