[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/40: ui: Handle EPIPE errors when displaying Guix version.
From: |
guix-commits |
Subject: |
01/40: ui: Handle EPIPE errors when displaying Guix version. |
Date: |
Tue, 17 Oct 2023 08:54:37 -0400 (EDT) |
zimoun pushed a commit to branch master
in repository guix.
commit b4d1eb53c01d3b6e7b255debb593d5c7de725977
Author: Simon Tournier <zimon.toutoune@gmail.com>
AuthorDate: Thu Oct 12 15:39:03 2023 +0200
ui: Handle EPIPE errors when displaying Guix version.
Fixes <https://issues.guix.gnu.org/66254>.
Reported by Clément Lassieur <clement@lassieur.org>.
* guix/ui.scm (show-version-and-exit): Handle EPIPE errors when displaying
version.
---
guix/ui.scm | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index 6f2d4fe245..e3bf07212f 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -552,19 +552,20 @@ See the \"Application Setup\" section in the manual, for
more info.\n"))
(define* (show-version-and-exit #:optional (command (car (command-line))))
"Display version information for COMMAND and `(exit 0)'."
- (simple-format #t "~a (~a) ~a~%"
- command %guix-package-name %guix-version)
- (format #t "Copyright ~a 2023 ~a"
- ;; TRANSLATORS: Translate "(C)" to the copyright symbol
- ;; (C-in-a-circle), if this symbol is available in the user's
- ;; locale. Otherwise, do not translate "(C)"; leave it as-is. */
- (G_ "(C)")
- (G_ "the Guix authors\n"))
- (display (G_"\
+ (leave-on-EPIPE
+ (simple-format #t "~a (~a) ~a~%"
+ command %guix-package-name %guix-version)
+ (format #t "Copyright ~a 2023 ~a"
+ ;; TRANSLATORS: Translate "(C)" to the copyright symbol
+ ;; (C-in-a-circle), if this symbol is available in the user's
+ ;; locale. Otherwise, do not translate "(C)"; leave it as-is. */
+ (G_ "(C)")
+ (G_ "the Guix authors\n"))
+ (display (G_"\
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
-"))
+")))
(exit 0))
(define (show-bug-report-information)
- 37/40: scripts: time-machine: Handle EPIPE errors when displaying help., (continued)
- 37/40: scripts: time-machine: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 40/40: guix: import: opam: Handle list of licenses., guix-commits, 2023/10/17
- 04/40: scripts: challenge: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 09/40: scripts: discover: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 20/40: scripts: locate: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 12/40: scripts: gc: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 06/40: scripts: copy: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 02/40: scripts: archive: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 05/40: scripts: container: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 16/40: scripts: home: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 01/40: ui: Handle EPIPE errors when displaying Guix version.,
guix-commits <=
- 21/40: scripts: offload: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 24/40: scripts: processes: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 11/40: scripts: edit: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 29/40: scripts: repl: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 17/40: scripts: import: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 32/40: scripts: show: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 34/40: scripts: style: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 25/40: scripts: publish: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 31/40: scripts: shell: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17
- 38/40: scripts: upgrade: Handle EPIPE errors when displaying help., guix-commits, 2023/10/17