From acaad991a7ddd689da38bae898b65a5b4e114dfe Mon Sep 17 00:00:00 2001 From: Martin Wiethan <47688561+Marterich@users.noreply.github.com> Date: Tue, 25 Jun 2024 22:05:19 +0200 Subject: [PATCH] fix compile run always starting ps5 (#2165) --- Compile.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Compile.ps1 b/Compile.ps1 index 80ca0729..e0f4c6d4 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -103,5 +103,11 @@ Set-Content -Path $scriptname -Value ($script_content -join "`r`n") -Encoding as Write-Progress -Activity "Compiling" -Completed if ($run){ - Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname" + try { + Start-Process -FilePath "pwsh" -ArgumentList ".\$scriptname" + } + catch { + Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname" + } + } \ No newline at end of file