on master help sign in
Output build.log on error
ef84d12Michael Snoyman
Stackage/Build.hs+2
@@ -19,6 +19,7 @@ import System.IO (BufferMode (NoBuffering),
19import qualified System.IO.UTF8
19import qualified System.IO.UTF8
20import System.Process (rawSystem, runProcess,
20import System.Process (rawSystem, runProcess,
21 waitForProcess)
21 waitForProcess)
22+import qualified Data.ByteString.Lazy.Char8 as L8
22
23
23defaultBuildSettings :: Maybe Int -- ^ argument to -j
24defaultBuildSettings :: Maybe Int -- ^ argument to -j
24 -> GhcMajorVersion
25 -> GhcMajorVersion
@@ -105,6 +106,7 @@ build settings' bp = do
105 ec <- waitForProcess ph
106 ec <- waitForProcess ph
106 unless (ec == ExitSuccess) $ do
107 unless (ec == ExitSuccess) $ do
107 putStrLn "Build failed, please see build.log"
108 putStrLn "Build failed, please see build.log"
109+ L8.readFile "build.log" >>= L8.putStr
108 exitWith ec
110 exitWith ec
109
111
110 putStrLn "Build completed successfully, checking for module name conflicts"
112 putStrLn "Build completed successfully, checking for module name conflicts"