diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-10-01 12:35:00 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-10-01 12:45:38 +0200 |
commit | 7dc19c33fc71e17a1d7ddd4563aa6ffd73d1a2cf (patch) | |
tree | 3fa1a4a0cf1ca3f0f6bff23449f71e09f343a32c | |
parent | 786a04c9ae3d69d1fe32999cd94b81efeb72c9fe (diff) | |
download | guix-7dc19c33fc71e17a1d7ddd4563aa6ffd73d1a2cf.tar.gz |
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'.
-rw-r--r-- | guix/ui.scm | 4 |
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) |