From 030f13f2d0501c9fb42c8f1efa0a15fa63c94d67 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Dec 2015 14:24:44 -0400 Subject: allow using `check` on a UncheckedProperty, which yields a Property --- src/Propellor/Property/Group.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Propellor/Property/Group.hs') diff --git a/src/Propellor/Property/Group.hs b/src/Propellor/Property/Group.hs index 8499d636..f91ef1c2 100644 --- a/src/Propellor/Property/Group.hs +++ b/src/Propellor/Property/Group.hs @@ -5,10 +5,8 @@ import Propellor.Base type GID = Int exists :: Group -> Maybe GID -> Property NoInfo -exists (Group group') mgid = check test $ - cmdProperty "addgroup" (args mgid) - `assume` MadeChange - `describe` unwords ["group", group'] +exists (Group group') mgid = check test (cmdProperty "addgroup" (args mgid)) + `describe` unwords ["group", group'] where groupFile = "/etc/group" test = not . elem group' . words <$> readProcess "cut" ["-d:", "-f1", groupFile] -- cgit v1.2.3