Ensure that if ghc compilation fails then we return a non-zero error code from build.bat
authorNeil Mitchell <ndmitchell@gmail.com>
Wed, 17 Feb 2016 16:24:19 +0000 (16:24 +0000)
committerNeil Mitchell <ndmitchell@gmail.com>
Wed, 17 Feb 2016 16:24:19 +0000 (16:24 +0000)
build.bat

index 348537d..10a6969 100644 (file)
--- a/build.bat
+++ b/build.bat
@@ -21,8 +21,8 @@
 \r
 @ghc %ghcArgs%\r
 \r
-@if %ERRORLEVEL% EQU 0 (\r
-    @rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains\r
-    @set GHC_PACKAGE_PATH=\r
-    @.shake\build %shakeArgs%\r
-)\r
+@if %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%\r
+\r
+@rem Unset GHC_PACKAGE_PATH variable, as otherwise ghc-cabal complains\r
+@set GHC_PACKAGE_PATH=\r
+@.shake\build %shakeArgs%\r