[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/hyperdrive e9d65ea5d2 102/163: Add: (h/cancel-install) Add
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/hyperdrive e9d65ea5d2 102/163: Add: (h/cancel-install) Add function to cancel installation |
Date: |
Fri, 31 May 2024 04:00:21 -0400 (EDT) |
branch: elpa/hyperdrive
commit e9d65ea5d2095ec6c64ed25b2a920a9f8346c5d2
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>
Add: (h/cancel-install) Add function to cancel installation
---
hyperdrive.el | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/hyperdrive.el b/hyperdrive.el
index c118519007..f19100e7b8 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1327,9 +1327,15 @@ If FORCEP, don't prompt for confirmation before
downloading."
:then (lambda (filename)
(check filename sha256 url))
:else (lambda (plz-error)
- (h/message "Trying next source because downloading
from URL %S failed: %S"
- url plz-error)
- (try))))
+ (pcase (plz-error-curl-error plz-error)
+ (`(2 . ,_)
+ ;; "Failed to initialize", likely due to
+ ;; `interrupt-process' in `h/cancel-install'.
+ (h/message "Canceled install"))
+ (_ ; Otherwise, display error and try next URL.
+ (h/message "Trying next source because
downloading from URL %S failed: %S"
+ url plz-error)
+ (try))))))
(h/message "Downloading gateway (%s)..."
(or (ignore-errors
(file-size-human-readable (head-size url)))
@@ -1359,6 +1365,12 @@ If FORCEP, don't prompt for confirmation before
downloading."
"hyperdrive-start"))))
(try))))
+(defun h/cancel-install ()
+ "Stop downloading/installing hyper-gateway-ushin."
+ (interactive)
+ (h/message "Cancelling install")
+ (interrupt-process h/install-in-progress-p))
+
(defun h/restart ()
"Restart the gateway."
(interactive)
- [nongnu] elpa/hyperdrive 51d878455a 078/163: Change: (h/menu) Add "installing" gateway indicator, (continued)
- [nongnu] elpa/hyperdrive 51d878455a 078/163: Change: (h/menu) Add "installing" gateway indicator, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 02e4a0b4e8 077/163: Change: (h/start) Move default start logic to default start function, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 867b99a2ae 091/163: Fix: (hyperdrive-install) Don't define with shorthands, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 2d867c2ecd 092/163: Fix: (h//gateway-wait-for-ready) Only jump to existing process buffer, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 147cd1e7c6 093/163: Change: (h//gateway-stop-default) Cancel wait-for-ready timer, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 32e3869220 097/163: Change: (hyperdrive-menu) Offer h/restart when gateway is started, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 583b1c5160 099/163: Change: (h/start) Check installed/installing in command, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive ea60263bb2 100/163: Change: (h/menu) Gateway suffix: "Upgrade", "Reinstall", "Install", ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 220be1068d 101/163: Change: (hyperdrive-install) Set h/install-in-progress-p to process, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 761efabd23 094/163: Add: (h/gateway-installed-predicate) Customizable option, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive e9d65ea5d2 102/163: Add: (h/cancel-install) Add function to cancel installation,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive 93fe2633fc 096/163: Change: Use h/gateway-installed-p instead of h//hyper-gateway-ushin-path, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive ee8e557aaa 079/163: Comment: (h/menu-refresh) Add TODO, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 6dc4af2fe0 104/163: Add: (h/gateway-installing-p) Predicate function, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive ec4d865d7d 105/163: Comment: Add TODO, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 0a26edcbf5 107/163: Change: (h/menu) Show h/cancel-install when installing, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive bd252024df 108/163: Change: (h/menu-bar-menu) Add "Install gateway", ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive ec8c2caa59 109/163: Change: (h/menu-bar-menu) Add "Cancel install", ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 66a27e64d1 113/163: Comment: Remove TODO, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive 73592a6256 115/163: Change: Don't make h/gateway-installed-p customizable, ELPA Syncer, 2024/05/31
- [nongnu] elpa/hyperdrive f94ae54617 111/163: Change: (hyperdrive-install) Use h/user-error instead of h/error, ELPA Syncer, 2024/05/31