From 29442f222ec2342c6dea7036e80e15eefa4158c0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 6 Dec 2014 13:21:19 -0400 Subject: Reboot.atEnd --- src/Propellor/Engine.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Propellor/Engine.hs') 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. -- cgit v1.2.3