diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-07 21:37:48 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-07 21:37:48 -0400 |
| commit | c98285d957865aadaac3190543be1a1b3ae16476 (patch) | |
| tree | d83efd3b5f7505a53b81c445a9fbe7154b0e3f67 /src | |
| parent | a74348655a865182ff9776e1718b24263a5e73ab (diff) | |
avoid non-exhaustive pattern match
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/FreeBSD/Poudriere.hs | 4 |
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 |
