Group: preferred style
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
This commit is contained in:
parent
e0d2761e00
commit
7d0f79a0c7
|
@ -9,6 +9,6 @@ exists group' mgid = check test (cmdProperty "addgroup" $ args mgid)
|
||||||
`describe` unwords ["group", group']
|
`describe` unwords ["group", group']
|
||||||
where
|
where
|
||||||
groupFile = "/etc/group"
|
groupFile = "/etc/group"
|
||||||
test = not <$> elem group' <$> words <$> readProcess "cut" ["-d:", "-f1", groupFile]
|
test = not . elem group' . words <$> readProcess "cut" ["-d:", "-f1", groupFile]
|
||||||
args Nothing = [group']
|
args Nothing = [group']
|
||||||
args (Just gid) = ["--gid", show gid, group']
|
args (Just gid) = ["--gid", show gid, group']
|
||||||
|
|
Loading…
Reference in New Issue