guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: guix: Do not close current-error-port.


From: Ricardo Wurmus
Subject: 02/02: guix: Do not close current-error-port.
Date: Tue, 11 Sep 2018 17:21:04 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 1afd1fbf3cf1d1283a009d5cbb8ad698bff4dd48
Author: Ricardo Wurmus <address@hidden>
Date:   Tue Sep 11 23:17:54 2018 +0200

    guix: Do not close current-error-port.
    
    Reported-by: Ludovic Court├Ęs <address@hidden>.
    
    * guix/scripts/build.scm (guix-build),
    guix/scripts/package.scm (guix-package): Duplicate port before handing it to
    build-output-port.
---
 guix/scripts/build.scm   | 8 +++++---
 guix/scripts/package.scm | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 3fa3c2c..9d38610 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -733,9 +733,11 @@ needed."
         ;; Set the build options before we do anything else.
         (set-build-options-from-command-line store opts)
 
-        (parameterize ((current-build-output-port (if quiet?
-                                                      (%make-void-port "w")
-                                                      (build-output-port 
#:verbose? #t))))
+        (parameterize ((current-build-output-port
+                        (if quiet?
+                            (%make-void-port "w")
+                            (build-output-port #:verbose? #t
+                                               #:port (duplicate-port 
(current-error-port) "w")))))
           (let* ((mode  (assoc-ref opts 'build-mode))
                  (drv   (options->derivations store opts))
                  (urls  (map (cut string-append <> "/log")
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 73cbccb..c3ed2ac 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -950,5 +950,6 @@ processed, #f otherwise."
                                %bootstrap-guile
                                (canonical-package guile-2.2))))
                          (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))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]