diff --git a/cabal-validate/src/ProcessUtil.hs b/cabal-validate/src/ProcessUtil.hs index 86c5c16e73f..7ed88774865 100644 --- a/cabal-validate/src/ProcessUtil.hs +++ b/cabal-validate/src/ProcessUtil.hs @@ -15,6 +15,7 @@ import qualified Data.Text.Lazy as T (toStrict) import qualified Data.Text.Lazy.Encoding as T (decodeUtf8) import System.Directory (withCurrentDirectory) import System.Exit (ExitCode (ExitFailure, ExitSuccess)) +import System.IO (hFlush, stdout, stderr) import System.Process.Typed (ExitCodeException (..), proc, readProcess, runProcess) import ANSI (SGR (BrightBlue, BrightGreen, BrightRed, Reset), setSGR) @@ -65,6 +66,8 @@ timed opts command args = do if verbosity opts > Quiet then do exitCode <- runProcess process + hFlush stdout + hFlush stderr pure (exitCode, ByteString.empty, ByteString.empty) else readProcess process