summaryrefslogtreecommitdiff
path: root/Propellor/Property/Docker.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Propellor/Property/Docker.hs')
-rw-r--r--Propellor/Property/Docker.hs18
1 files changed, 4 insertions, 14 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index 6757c7cc..09d7d6a4 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -335,29 +335,19 @@ provisionContainer cid = containerDesc cid $ property "provision" $ liftIO $ do
go lastline (v:rest) = case v of
StdoutLine s -> do
- debug ["stdout: ", show s]
maybe noop putStrLn lastline
hFlush stdout
go (Just s) rest
StderrLine s -> do
- debug ["stderr: ", show s]
maybe noop putStrLn lastline
hFlush stdout
hPutStrLn stderr s
hFlush stderr
go Nothing rest
- Done -> do
- debug ["reached Done"]
- ret lastline
- go lastline [] = do
- debug ["reached end of output"]
- ret lastline
-
- ret lastline = do
- let v = fromMaybe FailedChange $
- readish =<< lastline
- debug ["provisionContainer returning", show v]
- return v
+ Done -> ret lastline
+ go lastline [] = ret lastline
+
+ ret lastline = pure $ fromMaybe FailedChange $ readish =<< lastline
stopContainer :: ContainerId -> IO Bool
stopContainer cid = boolSystem dockercmd [Param "stop", Param $ fromContainerId cid ]