From 24049066dd0fb9a5ac7e64cc9ce9dc2d1408b1cf Mon Sep 17 00:00:00 2001 From: Tom Ellis Date: Mon, 22 May 2023 19:18:52 +0100 Subject: [PATCH] Add redundant waitForProcess to make duplication more obvious It can never run because of the throwIO before it --- src/System/Process/Typed.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System/Process/Typed.hs b/src/System/Process/Typed.hs index 731c0f9..9c69eaf 100644 --- a/src/System/Process/Typed.hs +++ b/src/System/Process/Typed.hs @@ -273,7 +273,7 @@ startProcess pConfig'@ProcessConfig {..} = liftIO $ do -- runtime! | isPermissionError e && not multiThreadedRuntime && isWindows -> P.waitForProcess pHandle - | otherwise -> throwIO e + | otherwise -> throwIO e >> P.waitForProcess pHandle Right () -> P.waitForProcess pHandle success <- atomically $ tryPutTMVar pExitCode ec evaluate $ assert success ()