branch: elpa/hyperdrive
commit 2189c6a558f2751b11d75b08f042f48caeb617fe
Author: Adam Porter <[email protected]>
Commit: Joseph Turner <[email protected]>

    Change: (hyperdrive-start) Simplify greatly
---
 hyperdrive-lib.el |  3 +--
 hyperdrive.el     | 21 +++------------------
 2 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index e68fee46f0..1607abcf2e 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1434,8 +1434,7 @@ Default function; see variable 
`h/gateway-start-function'."
            :command (cons hyper-gateway-ushin-path
                           (split-string-and-unquote h/gateway-command-args))
            :connection-type 'pipe))
-    (h/message "Starting gateway...")
-    (h//gateway-wait-for-ready)))
+    (h/message "Starting gateway...")))
 
 (defun h//gateway-after-start-announce ()
   "Announce that the gateway is ready."
diff --git a/hyperdrive.el b/hyperdrive.el
index 6855053957..5aaacb4a77 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -99,24 +99,9 @@
 Calls function set in option `hyperdrive-gateway-start-function',
 which see."
   (interactive)
-  ;; TODO: Verify that the expected version, e.g., 3.7.0, is installed.  Do 
this in an after-start hook?
-  (cond ((and (h//gateway-ready-p)
-              (or h/gateway-version-correct-p
-                  (h//gateway-at-expected-version-p)))
-         ;; Gateway already running and at expected version: call
-         ;; `gateway-wait-for-ready', which will run the run the
-         ;; gateway-ready-hook, because we're not calling the gateway-start
-         ;; function.
-         (h//gateway-wait-for-ready))
-        ((h//gateway-ready-p)
-         ;; Running but wrong version: prompt to upgrade or accept.
-         (if (yes-or-no-p "Gateway not installed at expected version; download 
correct version (yes) or proceed anyway (no)? ")
-             (h/install 'force)
-           ;; Override and use existing version.
-           (setf h/gateway-version-correct-p t)))
-        (t
-         ;; Gateway not running: start it, then check its version.
-         (funcall h/gateway-start-function))))
+  (unless (h//gateway-ready-p)
+    (funcall h/gateway-start-function))
+  (h//gateway-wait-for-ready))
 
 ;;;###autoload
 (defun hyperdrive-stop ()

Reply via email to