summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Group.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-12-05 17:53:32 -0400
committerJoey Hess <joeyh@joeyh.name>2015-12-05 17:53:32 -0400
commit97a224b194b96184c7938de0bb1e1f423612ccbc (patch)
tree7cc147c4726af8644510c07ba87597920f8301dc /src/Propellor/Property/Group.hs
parent5c6a43c3b888242443d790efbc1f9282e4e5675c (diff)
parent12548bae3d8feecce6a322162d91b827289ae824 (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Group.hs')
-rw-r--r--src/Propellor/Property/Group.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Propellor/Property/Group.hs b/src/Propellor/Property/Group.hs
index ce8a8398..8499d636 100644
--- a/src/Propellor/Property/Group.hs
+++ b/src/Propellor/Property/Group.hs
@@ -5,8 +5,10 @@ import Propellor.Base
type GID = Int
exists :: Group -> Maybe GID -> Property NoInfo
-exists (Group group') mgid = check test (cmdProperty "addgroup" $ args mgid)
- `describe` unwords ["group", group']
+exists (Group group') mgid = check test $
+ cmdProperty "addgroup" (args mgid)
+ `assume` MadeChange
+ `describe` unwords ["group", group']
where
groupFile = "/etc/group"
test = not . elem group' . words <$> readProcess "cut" ["-d:", "-f1", groupFile]