Prevent shelly tests from printing to STDERR (but shelly will if there's a problem)

This commit is contained in:
Jay McCarthy 2013-11-28 09:58:40 -07:00
parent ae395c20fd
commit fca73f8314

View File

@ -78,8 +78,15 @@
(thread
(λ ()
(with-handlers ([exn:input-port-closed? void])
(copy-port stderr error-port
(current-error-port))))))
(define cop (current-output-port))
(let loop ()
(define l (read-bytes-line stderr))
(unless (eof-object? l)
(displayln l error-port)
(displayln (format "STDERR: ~a" l) cop)
(flush-output error-port)
(flush-output cop)
(loop)))))))
(to-proc 'wait)
(define cmd-status (to-proc 'exit-code))
(when stdout (close-input-port stdout))