diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-01 01:12:05 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-01 01:12:05 -0400 |
| commit | 90f86b8b2bb7f0a3c834387827c9ec2e1876f342 (patch) | |
| tree | 10e74b0a52f4987c6f7e9cf2abf756275e0cefae /Propellor/CmdLine.hs | |
| parent | d53729495efe7174239deab3b5dd71204543b0d0 (diff) | |
not quite working docker container interface
Diffstat (limited to 'Propellor/CmdLine.hs')
| -rw-r--r-- | Propellor/CmdLine.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Propellor/CmdLine.hs b/Propellor/CmdLine.hs index 325f8d68..e43cf0aa 100644 --- a/Propellor/CmdLine.hs +++ b/Propellor/CmdLine.hs @@ -50,7 +50,7 @@ processCmdLine = go =<< getArgs else return $ Run s go _ = usage -defaultMain :: (HostName -> Maybe [Property]) -> IO () +defaultMain :: [HostName -> Maybe [Property]] -> IO () defaultMain getprops = go True =<< processCmdLine where go _ (Continue cmdline) = go False cmdline @@ -62,7 +62,8 @@ defaultMain getprops = go True =<< processCmdLine go False (Run host) = withprops host $ ensureProperties go False (Boot host) = withprops host $ boot - withprops host a = maybe (unknownhost host) a (getprops host) + withprops host a = maybe (unknownhost host) a $ + headMaybe $ catMaybes $ map (\get -> get host) getprops unknownhost :: HostName -> IO a unknownhost h = errorMessage $ unwords |
