Subject: [bug#66499] [PATCH v2 20/39] scripts: locate: Handle EPIPE errors when displaying help.

From: Simon Tournier <[email-masked]>
Date: Mon, 16 Oct 2023 19:29:38 +0200

* guix/scripts/locate.scm (%options): Handle EPIPE errors when displaying
help.
---
 guix/scripts/locate.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/locate.scm b/guix/scripts/locate.scm
index 79af533fd9..5f3e28797f 100644
--- a/guix/scripts/locate.scm
+++ b/guix/scripts/locate.scm
@@ -543,7 +543,7 @@ (define (show-help)
 
 (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")))
-- 
2.38.1