From 5c814d378063f3c3aeb1dfe4021bc0a3c991056a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 31 Mar 2014 14:22:48 -0400 Subject: propellor spin --- Propellor/CmdLine.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Propellor/CmdLine.hs b/Propellor/CmdLine.hs index e4a73d5b..69e68351 100644 --- a/Propellor/CmdLine.hs +++ b/Propellor/CmdLine.hs @@ -100,9 +100,13 @@ spin host = do , "./propellor --boot " ++ host ] getstatus :: Handle -> IO BootStrapStatus - getstatus h = maybe (getstatus h) return - . (readish <=< fromMarked statusMarker) - =<< hGetLine h + getstatus h = do + l <- hGetLine h + case readish =<< fromMarked statusMarker l of + Nothing -> do + putStrLn l + getstatus h + Just status -> return status data BootStrapStatus = HaveKeyRing | NeedKeyRing deriving (Read, Show, Eq) -- cgit v1.2.3