mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
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.
This commit is contained in:
parent
48f9484483
commit
b4d1eb53c0
1 changed files with 11 additions and 10 deletions
21
guix/ui.scm
21
guix/ui.scm
|
@ -552,19 +552,20 @@ (define (initialize-guix)
|
|||
|
||||
(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)
|
||||
|
|
Loading…
Reference in a new issue