summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-05-05 13:30:23 -0300
committerJoey Hess2014-05-05 13:30:23 -0300
commit9c0e9e2f192541db06d6559722c64ee740975236 (patch)
treee1919bb4c2e7374a311ae02ae946eee1e04bcb7a /Propellor/Property
parent38cc968a35d2256254d7a3fcc4d0e206d81cd25f (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs17
1 files changed, 12 insertions, 5 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index e5b8d64a..6757c7cc 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -346,11 +346,18 @@ provisionContainer cid = containerDesc cid $ property "provision" $ liftIO $ do
hPutStrLn stderr s
hFlush stderr
go Nothing rest
- Done -> ret lastline
- go lastline [] = ret lastline
-
- ret lastline = return $ fromMaybe FailedChange $
- readish =<< lastline
+ 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
stopContainer :: ContainerId -> IO Bool
stopContainer cid = boolSystem dockercmd [Param "stop", Param $ fromContainerId cid ]