diff options
| author | Joey Hess <joeyh@joeyh.name> | 2014-12-07 16:37:02 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2014-12-07 16:37:02 -0400 |
| commit | 5a932c382d4cbe65957eb0d3ebe4a9319d8dfd14 (patch) | |
| tree | 1e86107cd2c691d0340283c8e18d832eeceea3bd /src | |
| parent | d7d833b4319b36e2d530b2e81f42eb60056b5f9d (diff) | |
docuemnt info propigtion problem
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Engine.hs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Propellor/Engine.hs b/src/Propellor/Engine.hs index 44b10cab..aa2ea4a3 100644 --- a/src/Propellor/Engine.hs +++ b/src/Propellor/Engine.hs @@ -52,6 +52,15 @@ runEndAction host res (EndAction desc a) = actionMessageOn (hostName host) desc (ret, _s, _) <- runRWST (runWithHost (catchPropellor (a res))) host () 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. ensureProperties :: [Property] -> Propellor Result ensureProperties ps = ensure ps NoChange @@ -62,11 +71,6 @@ ensureProperties ps = ensure ps NoChange r <- actionMessageOn hn (propertyDesc l) (ensureProperty l) 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. -- -- For example, `fromHost hosts "otherhost" getSshPubKey` |
