summaryrefslogtreecommitdiff
path: root/Propellor/CmdLine.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Propellor/CmdLine.hs')
-rw-r--r--Propellor/CmdLine.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Propellor/CmdLine.hs b/Propellor/CmdLine.hs
index 93450b42..f973fc08 100644
--- a/Propellor/CmdLine.hs
+++ b/Propellor/CmdLine.hs
@@ -103,8 +103,10 @@ pullFirst cmdline next = do
if oldsha == newsha
then next
else do
- void $ boolSystem "make" [Param "build"]
- void $ boolSystem "./propellor" [Param "--continue", Param (show cmdline)]
+ ifM (boolSystem "make" [Param "build"])
+ ( void $ boolSystem "./propellor" [Param "--continue", Param (show cmdline)]
+ , error "Propellor build failed!"
+ )
getCurrentGitSha1 :: String -> IO String
getCurrentGitSha1 branchref = readProcess "git" ["show-ref", "--hash", branchref]