Skip to content
Snippets Groups Projects
Commit a7ef56db authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Clear out markers if they're already in the output.


This can occur if we catch an exception (which had markers)
and then embed the error string into another error string.
If the test runner picks up the nested marker that's disaster.

Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
parent 0aa73b78
No related branches found
No related tags found
No related merge requests found
......@@ -626,8 +626,17 @@ withMetadata marker tracer verbosity x = withFrozenCallStack $
| otherwise
-> id
NeverMark -> id)
-- Clear out any existing markers
. clearMarkers
$ x
clearMarkers :: String -> String
clearMarkers s = unlines . filter isMarker $ lines s
where
isMarker "-----BEGIN CABAL OUTPUT-----" = False
isMarker "-----END CABAL OUTPUT-----" = False
isMarker _ = True
-- -----------------------------------------------------------------------------
-- rawSystem variants
maybeExit :: IO ExitCode -> IO ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment