summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/FreeBSD/Poudriere.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/FreeBSD/Poudriere.hs')
-rw-r--r--src/Propellor/Property/FreeBSD/Poudriere.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Propellor/Property/FreeBSD/Poudriere.hs b/src/Propellor/Property/FreeBSD/Poudriere.hs
index 8d809d8b..7ed7f59e 100644
--- a/src/Propellor/Property/FreeBSD/Poudriere.hs
+++ b/src/Propellor/Property/FreeBSD/Poudriere.hs
@@ -52,8 +52,8 @@ runPoudriere cmd args =
lines <$> readProcess p a
listJails :: IO [String]
-listJails =
- map ((\(n:_) -> n ) . take 1 . words) <$> runPoudriere "jail" ["-l", "-q"]
+listJails = mapMaybe (headMaybe . take 1 . words)
+ <$> runPoudriere "jail" ["-l", "-q"]
jailExists :: Jail -> IO Bool
jailExists (Jail name _ _) = isInfixOf [name] <$> listJails