From 845072bff93db1c5d45c9d2d2fb7b358a5ce2573 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 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;