diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index cba3c220..4285ef7a 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -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;