Group: preferred style

Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
This commit is contained in:
Félix Sipma 2014-11-25 17:59:00 +01:00 committed by Joey Hess
parent e0d2761e00
commit 7d0f79a0c7
1 changed files with 1 additions and 1 deletions

View File

@ -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']