Skip to content

Commit 72ae940

Browse files
committed
Fix missing stderr in failed commands
1 parent 13509fb commit 72ae940

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Hedgehog/Extras/Test/Process.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ execFlex' execConfig pkgBin envBin arguments = GHC.withFrozenCallStack $ do
174174
, "━━━━ command ━━━━"
175175
, pkgBin <> " " <> L.unwords (fmap argQuote arguments)
176176
]
177-
++ if L.null stdout then [] else ["━━━━ stdout ━━━━" , stdout]
178-
++ if L.null stderr then [] else ["━━━━ stderr ━━━━" , stderr]
177+
++ (if L.null stdout then [] else ["━━━━ stdout ━━━━" , stdout])
178+
++ (if L.null stderr then [] else ["━━━━ stderr ━━━━" , stderr])
179179
H.failMessage GHC.callStack "Execute process failed"
180180
IO.ExitSuccess -> return stdout
181181

@@ -222,8 +222,8 @@ exec execConfig bin arguments = GHC.withFrozenCallStack $ do
222222
, "━━━━ command ━━━━"
223223
, bin <> " " <> L.unwords (fmap argQuote arguments)
224224
]
225-
++ if L.null stdout then [] else ["━━━━ stdout ━━━━" , stdout]
226-
++ if L.null stderr then [] else ["━━━━ stderr ━━━━" , stderr]
225+
++ (if L.null stdout then [] else ["━━━━ stdout ━━━━" , stdout])
226+
++ (if L.null stderr then [] else ["━━━━ stderr ━━━━" , stderr])
227227
IO.ExitSuccess -> return stdout
228228

229229
-- | Execute a process, returning the error code, the stdout, and the stderr.

0 commit comments

Comments
 (0)