Fix checking of correct errorlevel for crossgen
authorRahul Kumar <rahku@microsoft.com>
Tue, 3 May 2016 22:20:29 +0000 (15:20 -0700)
committerRahul Kumar <rahku@microsoft.com>
Tue, 3 May 2016 22:20:29 +0000 (15:20 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/463322e4e0700d8d839acc4ceed36425bafa65c3

src/coreclr/build.cmd

index 2a3d1ec..b30ba61 100644 (file)
@@ -449,7 +449,7 @@ echo %__MsgPrefix%Generating native image of mscorlib for %__BuildOS%.%__BuildAr
 set "__CrossGenMScorlibLog=%__LogsDir%\CrossgenMScorlib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
 set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe"
 "%__CrossgenExe%" /Platform_Assemblies_Paths "%__BinDir%" /out "%__BinDir%\mscorlib.ni.dll" "%__BinDir%\mscorlib.dll" > "%__CrossGenMScorlibLog%" 2>&1
-if errorlevel 1 (
+if NOT errorlevel 0 (
     echo %__MsgPrefix%Error: CrossGen mscorlib build failed. Refer to the build log file for details:
     echo     %__CrossGenMScorlibLog%
     exit /b 1