branch: elpa/hyperdrive
commit 2d867c2ecd48fe47bbb5d7886c0c577fa9886237
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>
Fix: (h//gateway-wait-for-ready) Only jump to existing process buffer
Also don't hardcode process buffer name.
---
hyperdrive-lib.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 34cfaae62a..6c7165c620 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1508,13 +1508,17 @@ Or if gateway isn't ready within timeout, show an
error."
(run-hooks 'h/gateway-ready-hook))
((< 10 (float-time (time-subtract nil start-time)))
;; Gateway still not responsive: show error.
- (if (equal h/gateway-start-function
- (eval (car (get 'h/gateway-start-function
- 'standard-value))))
+ (if-let (((equal h/gateway-start-function
+ (eval (car (get 'h/gateway-start-function
+ 'standard-value)))))
+ (process-buffer (process-buffer h/gateway-process)))
+ ;; TODO: why does the process still exist when
make-process
+ ;; fails, e.g., if the gateway command is something wrong
+ ;; like "ls"?
(progn
;; User has not customized the start function: show the
;; process buffer.
- (pop-to-buffer " *hyperdrive-start*")
+ (pop-to-buffer process-buffer)
(h/error "Gateway failed to start (see process buffer
for errors)"))
;; User appears to have customized the start function: don't
;; show the process buffer.