We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc8a7af commit ab52d08Copy full SHA for ab52d08
Cabal/src/Distribution/Simple/Utils.hs
@@ -789,9 +789,10 @@ rawSystemProcAction :: Verbosity -> Process.CreateProcess
789
-> IO (ExitCode, a)
790
rawSystemProcAction verbosity cp action = withFrozenCallStack $ do
791
logCommand verbosity cp
792
- (mStdin, mStdout, mStderr, p) <- Process.createProcess cp
793
- a <- action mStdin mStdout mStderr
794
- exitcode <- Process.waitForProcess p
+ (exitcode, a) <- Process.withCreateProcess cp $ \mStdin mStdout mStderr p -> do
+ a <- action mStdin mStdout mStderr
+ exitcode <- Process.waitForProcess p
795
+ return (exitcode, a)
796
unless (exitcode == ExitSuccess) $ do
797
let cmd = case Process.cmdspec cp of
798
Process.ShellCommand sh -> sh
0 commit comments