guix-commits
[Top][All Lists]
Advanced

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

05/05: ui: "guix help" silently ignores EPIPE.


From: guix-commits
Subject: 05/05: ui: "guix help" silently ignores EPIPE.
Date: Thu, 1 Oct 2020 06:47:43 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 7dc19c33fc71e17a1d7ddd4563aa6ffd73d1a2cf
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Oct 1 12:35:00 2020 +0200

    ui: "guix help" silently ignores EPIPE.
    
    This avoids a backtrace when running "guix help | head" or similar.
    
    * guix/ui.scm (run-guix): Wrap 'show-guix-help' calls in
    'leave-on-EPIPE'.
---
 guix/ui.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index ecaf975..e88b7b4 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -2134,7 +2134,7 @@ and signal handling have already been set up."
              (G_ "guix: missing command name~%"))
      (show-guix-usage))
     ((or ("-h") ("--help"))
-     (show-guix-help))
+     (leave-on-EPIPE (show-guix-help)))
     ((or ("-V") ("--version"))
      (show-version-and-exit "guix"))
     (((? option? o) args ...)
@@ -2145,7 +2145,7 @@ and signal handling have already been set up."
      (apply run-guix-command (string->symbol command)
             '("--help")))
     (("help" args ...)
-     (show-guix-help))
+     (leave-on-EPIPE (show-guix-help)))
     ((command args ...)
      (apply run-guix-command
             (string->symbol command)



reply via email to

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