summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-10-01 12:35:00 +0200
committerLudovic Courtès <ludo@gnu.org>2020-10-01 12:45:38 +0200
commit7dc19c33fc71e17a1d7ddd4563aa6ffd73d1a2cf (patch)
tree3fa1a4a0cf1ca3f0f6bff23449f71e09f343a32c /guix/ui.scm
parent786a04c9ae3d69d1fe32999cd94b81efeb72c9fe (diff)
downloadguix-7dc19c33fc71e17a1d7ddd4563aa6ffd73d1a2cf.tar.gz
guix-7dc19c33fc71e17a1d7ddd4563aa6ffd73d1a2cf.tar.xz
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'.
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index ecaf975c1f..e88b7b4015 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)