Don't overwrite crossgen log in build.cmd script (#6639)
authorJames Ko <jamesqko@gmail.com>
Sun, 7 Aug 2016 15:21:30 +0000 (11:21 -0400)
committerJan Kotas <jkotas@microsoft.com>
Sun, 7 Aug 2016 15:21:30 +0000 (08:21 -0700)
build.cmd

index f11074f..01b48de 100644 (file)
--- a/build.cmd
+++ b/build.cmd
@@ -28,7 +28,7 @@ set __VSVersion=vs2015
 
 :: Define a prefix for most output progress messages that come from this script. That makes
 :: it easier to see where these are coming from. Note that there is a trailing space here.
-set __MsgPrefix=BUILD:
+set "__MsgPrefix=BUILD: "
 
 :: Set the various build properties here so that CMake and MSBuild can pick them up
 set "__ProjectDir=%~dp0"
@@ -346,10 +346,10 @@ if %__BuildNativeCoreLib% EQU 1 (
 
     set "__CrossGenCoreLibLog=%__LogsDir%\CrossgenMSCoreLib_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
     set "__CrossgenExe=%__CrossComponentBinDir%\crossgen.exe"
-    "%__CrossgenExe%" /Platform_Assemblies_Paths "%__BinDir%" /out "%__BinDir%\mscorlib.ni.dll" "%__BinDir%\mscorlib.dll" > "%__CrossGenCoreLibLog%" 2>&1
+    "!__CrossgenExe!" /Platform_Assemblies_Paths "%__BinDir%" /out "%__BinDir%\mscorlib.ni.dll" "%__BinDir%\mscorlib.dll" > "!__CrossGenCoreLibLog!" 2>&1
     if NOT !errorlevel! == 0 (
         echo %__MsgPrefix%Error: CrossGen mscorlib facade build failed. Refer to the build log file for details:
-        echo     %__CrossGenCoreLibLog%
+        echo     !__CrossGenCoreLibLog!
         exit /b 1
     )
 )