Code cleanup and output exit status of build.

This commit is contained in:
hirschen 2012-04-18 08:59:35 +02:00
parent 204c8cc744
commit 101ef2497c

View File

@ -129,19 +129,17 @@ devel opts passThroughArgs = do
putStrLn "Terminating development server..." putStrLn "Terminating development server..."
terminateProcess ph terminateProcess ph
ec <- waitForProcess' ph ec <- waitForProcess' ph
putStrLn $ "Exit code: " ++ show ec
Ex.throwTo watchTid (userError "process finished") Ex.throwTo watchTid (userError "process finished")
watchForChanges hsSourceDirs [cabal] list watchForChanges hsSourceDirs [cabal] list
runBuildHook :: Maybe String -> IO () runBuildHook :: Maybe String -> IO ()
runBuildHook m = case m of runBuildHook (Just s) = do
Just s -> do
ret <- system s ret <- system s
case ret of case ret of
ExitFailure f -> putStrLn $ "Error executing hook: " ++ s ExitFailure f -> putStrLn $ "Error executing hook: " ++ s
otherwise -> return () otherwise -> return ()
Nothing -> return () runBuildHook Nothing = return ()
{- {-
configure with the built-in Cabal lib for non-cabal-dev, since configure with the built-in Cabal lib for non-cabal-dev, since