Change process name. Change output format string

This commit is contained in:
Andrew Kahr 2023-11-14 17:25:24 -08:00
parent 9af2bcb3a6
commit e002cd5768

View File

@ -156,20 +156,20 @@ $unityArgs = @(
# Remove null items as that will fail the Start-Process call # Remove null items as that will fail the Start-Process call
$unityArgs = $unityArgs | Where-Object { $_ -ne $null } $unityArgs = $unityArgs | Where-Object { $_ -ne $null }
$process = Start-Process -FilePath "$Env:UNITY_PATH\Editor\Unity.exe" ` $unityProcess = Start-Process -FilePath "$Env:UNITY_PATH\Editor\Unity.exe" `
-ArgumentList $unityArgs ` -ArgumentList $unityArgs `
-PassThru ` -PassThru `
-NoNewWindow -NoNewWindow
while ($true) { while ($true) {
if ($process.HasExited) { if ($unityProcess.HasExited) {
Start-Sleep -Seconds 5 Start-Sleep -Seconds 5
Get-Process Get-Process
Start-Sleep -Seconds 10 Start-Sleep -Seconds 10
Get-Process Get-Process
$BUILD_EXIT_CODE = $process.ExitCode $BUILD_EXIT_CODE = $unityProcess.ExitCode
# Display results # Display results
if ($BUILD_EXIT_CODE -eq 0) if ($BUILD_EXIT_CODE -eq 0)
@ -177,7 +177,7 @@ while ($true) {
Write-Output "Build Succeeded!!" Write-Output "Build Succeeded!!"
} else } else
{ {
Write-Output "$('Build failed, with exit code ')$($BUILD_EXIT_CODE)$('"')" Write-Output "Build failed, with exit code $BUILD_EXIT_CODE"
} }
Write-Output "" Write-Output ""