forcibly report "error" build status in case of failure
authorEugene Zhuravlev <jeka@intellij.com>
Tue, 31 Jan 2012 12:26:34 +0000 (13:26 +0100)
committerEugene Zhuravlev <jeka@intellij.com>
Tue, 31 Jan 2012 12:34:03 +0000 (13:34 +0100)
java/compiler/impl/src/com/intellij/compiler/impl/CompileDriver.java

index b4d2692efc09a83d3135bf3695dc3c021ca351e7..87198ba9d5e79ea053fb89eb519dd93e9972c4be 100644 (file)
@@ -497,7 +497,7 @@ public class CompileDriver {
                   break;
               }
             }
-            compileContext.putUserData(COMPILE_SERVER_BUILD_STATUS, status);
+            compileContext.putUserDataIfAbsent(COMPILE_SERVER_BUILD_STATUS, status);
             break;
         }
         return eventType == JpsRemoteProto.Message.Response.BuildEvent.Type.BUILD_COMPLETED;
@@ -511,6 +511,7 @@ public class CompileDriver {
           LOG.info(trace);
           System.out.println(trace);
         }
+        compileContext.putUserData(COMPILE_SERVER_BUILD_STATUS, ExitStatus.ERRORS);
       }
 
       @Override