From df2639218a0d0d0a5a0b19930113e5fdbb3fec2f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Mar 2017 12:45:10 -0400 Subject: [PATCH] improve git-annex-shell exit status propigation --- Test.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Test.hs b/Test.hs index 88c2b6e8cd..259a60400f 100644 --- a/Test.hs +++ b/Test.hs @@ -2116,9 +2116,8 @@ setTestMode testmode = do runFakeSsh :: [String] -> IO () runFakeSsh ("-n":ps) = runFakeSsh ps runFakeSsh (_host:cmd:[]) = do - let p = shell cmd - (_, _, _, pid) <- createProcess p - forceSuccessProcess p pid + (_, _, _, pid) <- createProcess (shell cmd) + exitWith =<< waitForProcess pid runFakeSsh ps = error $ "fake ssh option parse error: " ++ show ps getTestMode :: IO TestMode