emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive 0e0942f731 023/163: Fix: (h/install)


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 0e0942f731 023/163: Fix: (h/install)
Date: Fri, 31 May 2024 04:00:08 -0400 (EDT)

branch: elpa/hyperdrive
commit 0e0942f731ea6fac09844b081f2d326dad9213aa
Author: Adam Porter <adam@alphapapa.net>
Commit: Joseph Turner <joseph@ushin.org>

    Fix: (h/install)
    
    If HEAD-SIZE's request failed and it returned nil,
    FILE-SIZE-HUMAN-READABLE would give an error.
---
 hyperdrive.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index fa8ec9a43d..9d69b82366 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1313,7 +1313,7 @@ version."
              (h/error "Downloading failed; no more mirrors available")))
          ;; TODO: Test.
          (head-size (url)
-           (when-let ((response (ignore-errors (plz 'head url :as 'response))))
+           (when-let ((response (plz 'head url :as 'response)))
              (cl-parse-integer
               (alist-get 'content-length (plz-response-headers response)))))
          (download (url sha256)
@@ -1325,7 +1325,8 @@ version."
                                 plz-error)
                      (try)))
            (h/message "Downloading gateway (%s)..."
-                      (or (file-size-human-readable (head-size url))
+                      (or (ignore-errors
+                            (file-size-human-readable (head-size url)))
                           "unknown size")))
          (check (file-name sha256)
            (if (with-temp-buffer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]