File tree 1 file changed +7
-7
lines changed
hydra-test-utils/src/Test/Hydra
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -145,13 +145,13 @@ checkProcessHasNotDied name processHandle mStdErr =
145
145
waitForProcess processHandle >>= \ case
146
146
ExitSuccess -> failure " Process has stopped"
147
147
ExitFailure exit -> do
148
- let failureMsg = " Process " <> show name <> " exited with failure code: " <> show exit
149
- errorMsg <- case mStdErr of
150
- Nothing -> pure [failureMsg]
151
- Just stdErr -> do
152
- errorOutput <- hGetContents stdErr
153
- pure [failureMsg, " Process stderr: " <> errorOutput]
154
- failure . toString $ unlines errorMsg
148
+ mErrorOutput <- traverse hGetContents mStdErr
149
+ let mErrorMsg = ( " Process stderr: " <> ) <$> mErrorOutput
150
+ failure . toString $
151
+ unlines
152
+ ( " Process " <> show name <> " exited with failure code: " <> show exit
153
+ : maybeToList mErrorMsg
154
+ )
155
155
156
156
-- | Like 'coverTable', but construct the weight requirements generically from
157
157
-- the provided label.
You can’t perform that action at this time.
0 commit comments