Make specifying PWSH_PATH optional

This commit is contained in:
Manuel Thalmann 2024-08-09 02:12:27 +02:00
parent 8f43f82e5f
commit 3fad7125f7

View file

@ -62,7 +62,7 @@ $null = New-Module {
return;
}
if (Test-Path $env:PWSH_PATH) {
if ($env:PWSH_PATH -and (Test-Path $env:PWSH_PATH)) {
attrib "-R" "$env:PWSH_PATH\*" /S /D;
Remove-Item -Recurse -Force $env:PWSH_PATH;
continue;