raco setup: fix reporting of stderr output
Handle was mangled in commit 17275b946a
.
This commit is contained in:
parent
542b960d12
commit
7067559ac7
|
@ -176,12 +176,18 @@
|
||||||
[(path? cc)
|
[(path? cc)
|
||||||
(path->relative-string/setup cc #:cache pkg-path-cache)]
|
(path->relative-string/setup cc #:cache pkg-path-cache)]
|
||||||
[else cc]))
|
[else cc]))
|
||||||
(let ([msg (if (exn? x)
|
(let ([msg (cond
|
||||||
(format-error x #:long? #f #:to-string? #t #:cache pkg-path-cache)
|
[(exn? x)
|
||||||
;; `x` is a pair of long and short strings:
|
(format-error x #:long? #f #:to-string? #t #:cache pkg-path-cache)]
|
||||||
(cdr x))])
|
[(not x)
|
||||||
(unless (null? x) (for ([str (in-list (regexp-split #rx"\n" msg))])
|
;; No error; just output
|
||||||
(setup-fprintf port #f " ~a" str))))
|
#f]
|
||||||
|
[else
|
||||||
|
;; `x` is a pair of strings, long and short forms of the error:
|
||||||
|
(cdr x)])])
|
||||||
|
(when x
|
||||||
|
(for ([str (in-list (regexp-split #rx"\n" msg))])
|
||||||
|
(setup-fprintf port #f " ~a" str))))
|
||||||
(unless (zero? (string-length out)) (eprintf "STDOUT:\n~a=====\n" out))
|
(unless (zero? (string-length out)) (eprintf "STDOUT:\n~a=====\n" out))
|
||||||
(unless (zero? (string-length err)) (eprintf "STDERR:\n~a=====\n" err)))))
|
(unless (zero? (string-length err)) (eprintf "STDERR:\n~a=====\n" err)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user