scripts: locate: Handle EPIPE errors when displaying help.

* guix/scripts/locate.scm (%options): Handle EPIPE errors when displaying
help.
This commit is contained in:
Simon Tournier 2023-10-16 18:48:13 +02:00
parent 078107289a
commit 55c3776023
No known key found for this signature in database
GPG Key ID: 92F1D22C608EE7E5

View File

@ -543,7 +543,7 @@ Locate FILE and return the list of packages that contain it.\n"))
(define %options
(list (option '(#\h "help") #f #f
(lambda args (show-help) (exit 0)))
(lambda args (leave-on-EPIPE (show-help)) (exit 0)))
(option '(#\V "version") #f #f
(lambda (opt name arg result)
(show-version-and-exit "guix locate")))