From 24ba572be589bd7ce4ceca5e6db396756971284f Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Fri, 9 Aug 2024 02:12:27 +0200 Subject: [PATCH] Make specifying `PWSH_PATH` optional --- scripts/Windows/OS/Install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index 873fe2651..20cabdf35 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -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;