summaryrefslogtreecommitdiff
path: root/src/Propellor/Engine.hs
diff options
context:
space:
mode:
authorJoey Hess2014-12-06 13:21:19 -0400
committerJoey Hess2014-12-06 13:21:19 -0400
commit29442f222ec2342c6dea7036e80e15eefa4158c0 (patch)
treef29929e1d14f7aa8a7e8c662fcad237a3b7e143e /src/Propellor/Engine.hs
parent62697c7b7f7ba2d39bfad632f1cf720c9805bdd2 (diff)
Reboot.atEnd
Diffstat (limited to 'src/Propellor/Engine.hs')
-rw-r--r--src/Propellor/Engine.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Propellor/Engine.hs b/src/Propellor/Engine.hs
index 310f4c84..44b10cab 100644
--- a/src/Propellor/Engine.hs
+++ b/src/Propellor/Engine.hs
@@ -43,13 +43,13 @@ mainProperties host = do
-- are then also run.
runPropellor :: Host -> Propellor Result -> IO Result
runPropellor host a = do
- (ret, _s, endactions) <- runRWST (runWithHost a) host ()
- endrets <- mapM (runEndAction host) endactions
- return $ mconcat (ret:endrets)
+ (res, _s, endactions) <- runRWST (runWithHost a) host ()
+ endres <- mapM (runEndAction host res) endactions
+ return $ mconcat (res:endres)
-runEndAction :: Host -> EndAction -> IO Result
-runEndAction host (EndAction desc a) = actionMessageOn (hostName host) desc $ do
- (ret, _s, _) <- runRWST (runWithHost (catchPropellor a)) host ()
+runEndAction :: Host -> Result -> EndAction -> IO Result
+runEndAction host res (EndAction desc a) = actionMessageOn (hostName host) desc $ do
+ (ret, _s, _) <- runRWST (runWithHost (catchPropellor (a res))) host ()
return ret
-- | Ensures a list of Properties, with a display of each as it runs.