diff options
| author | Joey Hess <id@joeyh.name> | 2014-12-06 13:21:19 -0400 |
|---|---|---|
| committer | Joey Hess <id@joeyh.name> | 2014-12-06 13:21:19 -0400 |
| commit | 29442f222ec2342c6dea7036e80e15eefa4158c0 (patch) | |
| tree | f29929e1d14f7aa8a7e8c662fcad237a3b7e143e /src/Propellor/Engine.hs | |
| parent | 62697c7b7f7ba2d39bfad632f1cf720c9805bdd2 (diff) | |
Reboot.atEnd
Diffstat (limited to 'src/Propellor/Engine.hs')
| -rw-r--r-- | src/Propellor/Engine.hs | 12 |
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. |
