summaryrefslogtreecommitdiff
path: root/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 15:38:32 -0400
committerJoey Hess2014-04-01 15:38:32 -0400
commit8c6d07fd2c9a65940af872bc89293732a6f69964 (patch)
treea937e7e22670bceb917f9eec708c1d77ef68a6a7 /Propellor
parentd1135ba87d9b446886dfc07ac6cd8595e1521aee (diff)
improve UI when exiting shell in docker container
Diffstat (limited to 'Propellor')
-rw-r--r--Propellor/Property/Docker.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index 62bb0017..577c837a 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -185,12 +185,13 @@ chain s = case readish s of
Just ident@(ContainerIdent _image hn cn _rp) -> do
let cid = ContainerId hn cn
writeFile propellorIdent (show ident)
- t <- async $ simpleSh $ namedPipe cid
- void $ ifM (inPath "bash")
- ( boolSystem "bash" [Param "-l"]
- , boolSystem "/bin/sh" []
- )
- wait t
+ void $ async $ simpleSh $ namedPipe cid
+ forever $ do
+ void $ ifM (inPath "bash")
+ ( boolSystem "bash" [Param "-l"]
+ , boolSystem "/bin/sh" []
+ )
+ putStrLn "Container is still running. Press ^P^Q to detach."
-- | Once a container is running, propellor can be run inside
-- it to provision it.