File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -962,13 +962,16 @@ function Start-UnityEditor {
962
962
963
963
$process = Start-Process @setProcessArgs
964
964
if ( $Wait ) {
965
- if ( $process.ExitCode -ne 0 ) {
966
- if ( $LogFile -and (Test-Path $LogFile - Type Leaf) ) {
967
- Write-UnityErrors $LogFile
968
- Write-Verbose " Writing $LogFile to Information stream Tagged as 'Logs'"
969
- Get-Content $LogFile | ForEach-Object { Write-Information - MessageData $_ - Tags ' Logs' }
970
- }
965
+ if ( $LogFile -and (Test-Path $LogFile - Type Leaf) ) {
966
+ # Note that Unity sometimes returns a success ExitCode despite the presence of errors, but we want
967
+ # to make sure that we flag such errors.
968
+ Write-UnityErrors $LogFile
969
+
970
+ Write-Verbose " Writing $LogFile to Information stream Tagged as 'Logs'"
971
+ Get-Content $LogFile | ForEach-Object { Write-Information - MessageData $_ - Tags ' Logs' }
972
+ }
971
973
974
+ if ( $process.ExitCode -ne 0 ) {
972
975
Write-Error " Unity quit with non-zero exit code: $ ( $process.ExitCode ) "
973
976
}
974
977
}
@@ -1012,7 +1015,6 @@ function Get-IsUnityError {
1012
1015
return $true
1013
1016
}
1014
1017
1015
-
1016
1018
# In the future, additional kinds of errors that can be found in Unity logs could be added here:
1017
1019
# ...
1018
1020
You can’t perform that action at this time.
0 commit comments