mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-01-25 13:41:56 +01:00
Output build.log on error
This commit is contained in:
parent
7f5293592b
commit
ef84d1201a
@ -19,6 +19,7 @@ import System.IO (BufferMode (NoBuffering),
|
|||||||
import qualified System.IO.UTF8
|
import qualified System.IO.UTF8
|
||||||
import System.Process (rawSystem, runProcess,
|
import System.Process (rawSystem, runProcess,
|
||||||
waitForProcess)
|
waitForProcess)
|
||||||
|
import qualified Data.ByteString.Lazy.Char8 as L8
|
||||||
|
|
||||||
defaultBuildSettings :: Maybe Int -- ^ argument to -j
|
defaultBuildSettings :: Maybe Int -- ^ argument to -j
|
||||||
-> GhcMajorVersion
|
-> GhcMajorVersion
|
||||||
@ -105,6 +106,7 @@ build settings' bp = do
|
|||||||
ec <- waitForProcess ph
|
ec <- waitForProcess ph
|
||||||
unless (ec == ExitSuccess) $ do
|
unless (ec == ExitSuccess) $ do
|
||||||
putStrLn "Build failed, please see build.log"
|
putStrLn "Build failed, please see build.log"
|
||||||
|
L8.readFile "build.log" >>= L8.putStr
|
||||||
exitWith ec
|
exitWith ec
|
||||||
|
|
||||||
putStrLn "Build completed successfully, checking for module name conflicts"
|
putStrLn "Build completed successfully, checking for module name conflicts"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user