summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 13:06:50 -0400
committerJoey Hess2014-04-01 13:06:50 -0400
commitff4bc019cfd7ba4caa5fe803d8e70a9e0b75d2fd (patch)
tree231108874474cefb50faa2db24fc6c816ed88599 /Propellor/Property
parent2d4a0f760b00977aa9f2d00e4bcae6a71bb1fc1e (diff)
typo
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Docker.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs
index b6980bbd..92f59274 100644
--- a/Propellor/Property/Docker.hs
+++ b/Propellor/Property/Docker.hs
@@ -121,7 +121,7 @@ ensureContainer cid@(ContainerId hn cn) image containerprops = do
-- Start the simplesh server that will be used by propellor
-- to run commands in the container. An interactive shell
-- is also started, so the user can attach and use it if desired.
- startsimplesh = ["sh" ++ "-c" ++ "./propellor --simplesh " ++ namedPipe cid ++ " & ; bash -l"]
+ startsimplesh = ["sh", "-c", "./propellor --simplesh " ++ namedPipe cid ++ " & ; bash -l"]
getrunningident = simpleShClient (namedPipe cid) "cat" [propellorIdent] $
pure . headMaybe . catMaybes . map readish . catMaybes . map getStdout
@@ -189,8 +189,8 @@ stopContainer :: ContainerId -> IO Bool
stopContainer cid = boolSystem dockercmd [Param "stop", Param $ fromContainerId cid ]
removeContainer :: ContainerId -> IO ()
-removeContainer cid = void $ boolSystem "sh"
- [Param "-c", Param $ dockercmd ++ " rm " ++ fromContainerId cid ]
+removeContainer cid = void $ catchMaybeIO $
+ readProcess "sh" [Param "-c", Param $ dockercmd ++ " rm " ++ fromContainerId cid ]
runContainer :: Image -> [RunParam] -> [String] -> IO Bool
runContainer image ps cmd = boolSystem dockercmd $ map Param $