zilch-cli-rust: fix statusbar when stderr is not a terminal

This commit is contained in:
puck 2025-03-02 22:11:59 +00:00
parent 741fc30d84
commit 0ffa327f9b

View file

@ -57,7 +57,7 @@ executables in the crate, if unspecified)
; Set up the logger. ; Set up the logger.
(define (set-print-logs val) #f) (define (set-print-logs val) #f)
(let ((prev-error-handler (current-exception-handler))) (current-exception-handler (lambda data (set-print-logs #t) (apply prev-error-handler data)))) (let ((prev-error-handler (current-exception-handler))) (current-exception-handler (lambda data (set-print-logs #t) (apply prev-error-handler data))))
(when (not (assoc 'debug options)) (terminal-port? (current-error-port)) (when (terminal-port? (current-error-port))
(let-values (((new-out new-err statusbar-set-print-logs logger) (statusbar-logger (current-output-port) (current-error-port) (assoc 'print-build-logs options)))) (let-values (((new-out new-err statusbar-set-print-logs logger) (statusbar-logger (current-output-port) (current-error-port) (assoc 'print-build-logs options))))
(current-output-port new-out) (current-output-port new-out)
(current-error-port new-err) (current-error-port new-err)