~ruther/guix-local

d2f2c8f126ebc400f016781805c76683cc364c18 — Ludovic Courtès 10 years ago df36e62
size: Gracefully handle EPIPE.

* guix/scripts/size.scm (guix-size): Wrap body in 'leave-on-EPIPE'.
1 files changed, 11 insertions(+), 10 deletions(-)

M guix/scripts/size.scm
M guix/scripts/size.scm => guix/scripts/size.scm +11 -10
@@ 280,15 280,16 @@ Report the size of PACKAGE and its dependencies.\n"))
        (()
         (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")))))))