docuemnt info propigtion problem

This commit is contained in:
Joey Hess 2014-12-07 16:37:02 -04:00
parent d7d833b431
commit 5a932c382d
1 changed files with 9 additions and 5 deletions

View File

@ -52,6 +52,15 @@ runEndAction host res (EndAction desc a) = actionMessageOn (hostName host) desc
(ret, _s, _) <- runRWST (runWithHost (catchPropellor (a res))) host () (ret, _s, _) <- runRWST (runWithHost (catchPropellor (a res))) host ()
return ret return ret
-- | For when code running in the Propellor monad needs to ensure a
-- Property.
--
-- Note that any info of the Property is not propigated out to
-- the enclosing Property, and so will not be available for propellor to
-- use.
ensureProperty :: Property -> Propellor Result
ensureProperty = catchPropellor . propertySatisfy
-- | Ensures a list of Properties, with a display of each as it runs. -- | Ensures a list of Properties, with a display of each as it runs.
ensureProperties :: [Property] -> Propellor Result ensureProperties :: [Property] -> Propellor Result
ensureProperties ps = ensure ps NoChange ensureProperties ps = ensure ps NoChange
@ -62,11 +71,6 @@ ensureProperties ps = ensure ps NoChange
r <- actionMessageOn hn (propertyDesc l) (ensureProperty l) r <- actionMessageOn hn (propertyDesc l) (ensureProperty l)
ensure ls (r <> rs) ensure ls (r <> rs)
-- | For when code running in the Propellor monad needs to ensure a
-- Property.
ensureProperty :: Property -> Propellor Result
ensureProperty = catchPropellor . propertySatisfy
-- | Lifts an action into a different host. -- | Lifts an action into a different host.
-- --
-- For example, `fromHost hosts "otherhost" getSshPubKey` -- For example, `fromHost hosts "otherhost" getSshPubKey`