From 90f86b8b2bb7f0a3c834387827c9ec2e1876f342 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Apr 2014 01:12:05 -0400 Subject: not quite working docker container interface --- Propellor/CmdLine.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Propellor/CmdLine.hs') 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 -- cgit v1.3-2-g0d8e