Make specifying PWSH_PATH optional

This commit is contained in:
Manuel Thalmann 2024-08-09 02:12:27 +02:00
parent 4becccc18b
commit e7b9a92918

View file

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