fix compile run always starting ps5 (#2165)

This commit is contained in:
Martin Wiethan
2024-06-25 22:05:19 +02:00
committed by GitHub
parent e00bc5f723
commit acaad991a7

View File

@ -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"
}
}