improve git-annex-shell exit status propigation

This commit is contained in:
Joey Hess 2017-03-20 12:45:10 -04:00
parent 3cffb941d1
commit df2639218a
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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