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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,5 +103,11 @@ Set-Content -Path $scriptname -Value ($script_content -join "`r`n") -Encoding as
Write-Progress -Activity "Compiling" -Completed Write-Progress -Activity "Compiling" -Completed
if ($run){ if ($run){
Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname" try {
Start-Process -FilePath "pwsh" -ArgumentList ".\$scriptname"
}
catch {
Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname"
}
} }