guix package: Swallow EPIPE upon 'guix package --list-generations'.
Fixes <http://bugs.gnu.org/27017>. Reported by Alex Vong <alexvong1995@gmail.com>. * guix/scripts/package.scm (process-query) <'list-generations>: Wrap body in 'leave-on-EPIPE'.master
parent
59d0f067ff
commit
807ba51950
|
@ -681,24 +681,26 @@ processed, #f otherwise."
|
||||||
(unless (null-list? (cdr numbers))
|
(unless (null-list? (cdr numbers))
|
||||||
(display-profile-content-diff profile (car numbers) (cadr numbers))
|
(display-profile-content-diff profile (car numbers) (cadr numbers))
|
||||||
(diff-profiles profile (cdr numbers))))
|
(diff-profiles profile (cdr numbers))))
|
||||||
(cond ((not (file-exists? profile)) ; XXX: race condition
|
|
||||||
(raise (condition (&profile-not-found-error
|
(leave-on-EPIPE
|
||||||
(profile profile)))))
|
(cond ((not (file-exists? profile)) ; XXX: race condition
|
||||||
((string-null? pattern)
|
(raise (condition (&profile-not-found-error
|
||||||
(list-generation display-profile-content
|
(profile profile)))))
|
||||||
(car (profile-generations profile)))
|
((string-null? pattern)
|
||||||
(diff-profiles profile (profile-generations profile)))
|
(list-generation display-profile-content
|
||||||
((matching-generations pattern profile)
|
(car (profile-generations profile)))
|
||||||
=>
|
(diff-profiles profile (profile-generations profile)))
|
||||||
(lambda (numbers)
|
((matching-generations pattern profile)
|
||||||
(if (null-list? numbers)
|
=>
|
||||||
(exit 1)
|
(lambda (numbers)
|
||||||
(leave-on-EPIPE
|
(if (null-list? numbers)
|
||||||
(list-generation display-profile-content (car numbers))
|
(exit 1)
|
||||||
(diff-profiles profile numbers)))))
|
(begin
|
||||||
(else
|
(list-generation display-profile-content (car numbers))
|
||||||
(leave (G_ "invalid syntax: ~a~%")
|
(diff-profiles profile numbers)))))
|
||||||
pattern)))
|
(else
|
||||||
|
(leave (G_ "invalid syntax: ~a~%")
|
||||||
|
pattern))))
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(('list-installed regexp)
|
(('list-installed regexp)
|
||||||
|
|
Loading…
Reference in New Issue