guix: Do not close current-error-port.

Reported-by: Ludovic Courtès <ludo@gnu.org>.

* guix/scripts/build.scm (guix-build),
guix/scripts/package.scm (guix-package): Duplicate port before handing it to
build-output-port.
This commit is contained in:
Ricardo Wurmus 2018-09-11 23:17:54 +02:00
parent f72e5f93b7
commit 1afd1fbf3c
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
2 changed files with 7 additions and 4 deletions

View File

@ -733,9 +733,11 @@ needed."
;; Set the build options before we do anything else. ;; Set the build options before we do anything else.
(set-build-options-from-command-line store opts) (set-build-options-from-command-line store opts)
(parameterize ((current-build-output-port (if quiet? (parameterize ((current-build-output-port
(if quiet?
(%make-void-port "w") (%make-void-port "w")
(build-output-port #:verbose? #t)))) (build-output-port #:verbose? #t
#:port (duplicate-port (current-error-port) "w")))))
(let* ((mode (assoc-ref opts 'build-mode)) (let* ((mode (assoc-ref opts 'build-mode))
(drv (options->derivations store opts)) (drv (options->derivations store opts))
(urls (map (cut string-append <> "/log") (urls (map (cut string-append <> "/log")

View File

@ -950,5 +950,6 @@ processed, #f otherwise."
%bootstrap-guile %bootstrap-guile
(canonical-package guile-2.2)))) (canonical-package guile-2.2))))
(current-build-output-port (current-build-output-port
(build-output-port #:verbose? verbose?))) (build-output-port #:verbose? verbose?
#:port (duplicate-port (current-error-port) "w"))))
(process-actions (%store) opts)))))) (process-actions (%store) opts))))))