mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
size: Gracefully handle EPIPE.
* guix/scripts/size.scm (guix-size): Wrap body in 'leave-on-EPIPE'.
This commit is contained in:
parent
df36e62938
commit
d2f2c8f126
1 changed files with 11 additions and 10 deletions
|
@ -280,15 +280,16 @@ (define (guix-size . args)
|
|||
(()
|
||||
(leave (_ "missing store item argument\n")))
|
||||
((file)
|
||||
(with-store store
|
||||
(run-with-store store
|
||||
(mlet* %store-monad ((item (ensure-store-item file))
|
||||
(profile (store-profile item)))
|
||||
(if map-file
|
||||
(begin
|
||||
(profile->page-map profile map-file)
|
||||
(return #t))
|
||||
(display-profile* profile)))
|
||||
#:system system)))
|
||||
(leave-on-EPIPE
|
||||
(with-store store
|
||||
(run-with-store store
|
||||
(mlet* %store-monad ((item (ensure-store-item file))
|
||||
(profile (store-profile item)))
|
||||
(if map-file
|
||||
(begin
|
||||
(profile->page-map profile map-file)
|
||||
(return #t))
|
||||
(display-profile* profile)))
|
||||
#:system system))))
|
||||
((files ...)
|
||||
(leave (_ "too many arguments\n")))))))
|
||||
|
|
Loading…
Reference in a new issue