Make specifying PWSH_PATH optional

This commit is contained in:
Manuel Thalmann 2024-08-09 02:12:27 +02:00
parent 68bec52a7b
commit 40ade7b471

View file

@ -63,7 +63,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;