diff options
| author | Joey Hess <joey@kitenet.net> | 2014-06-07 00:07:08 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-06-07 00:07:19 -0400 |
| commit | 969db1ed56157aa202359c0f47fff783baba6eac (patch) | |
| tree | bd62764ae149804b64dd7e8bde21560344847bf3 /src/Propellor/Property.hs | |
| parent | a4dd315d3c3bcf4fdd18f39592676de19b221815 (diff) | |
when ssh key data is missing, allow both error messages to be printed
Diffstat (limited to 'src/Propellor/Property.hs')
| -rw-r--r-- | src/Propellor/Property.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs index e3d46eae..c7a03765 100644 --- a/src/Propellor/Property.hs +++ b/src/Propellor/Property.hs @@ -37,6 +37,15 @@ combineProperties desc ps = Property desc (go ps NoChange) (combineAttrs ps) FailedChange -> return FailedChange _ -> go ls (r <> rs) +-- | Does not stop on failure (but does propigate failure at the end). +combineProperties' :: Desc -> [Property] -> Property +combineProperties' desc ps = Property desc (go ps NoChange) (combineAttrs ps) + where + go [] rs = return rs + go (l:ls) rs = do + r <- ensureProperty l + go ls (r <> rs) + -- | Combines together two properties, resulting in one property -- that ensures the first, and if the first succeeds, ensures the second. -- The property uses the description of the first property. |
