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'.
This commit is contained in:
Ludovic Courtès 2020-10-01 12:35:00 +02:00
parent 786a04c9ae
commit 7dc19c33fc
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2134,7 +2134,7 @@ (define option? (cut string-prefix? "-" <>))
(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 @@ (define option? (cut string-prefix? "-" <>))
(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)