branch: elpa/hyperdrive
commit 1026092bc6c59e756d7ae372608d383e3ed27ccd
Author: Adam Porter <[email protected]>
Commit: Adam Porter <[email protected]>

    Change: (h/gateway-command-args) Add "--port" at runtime
---
 hyperdrive-lib.el  | 3 ++-
 hyperdrive-vars.el | 8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 30e6d8b1b7..7e6da0a3e0 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1432,7 +1432,8 @@ Default function; see variable 
`h/gateway-start-function'."
          :name "hyperdrive-gateway"
          :buffer " *hyperdrive-start*"
          :command (cons (h//gateway-path)
-                        (split-string-and-unquote h/gateway-command-args))
+                        (append (split-string-and-unquote 
h/gateway-command-args)
+                                (list "--port" (number-to-string 
h/gateway-port))))
          :connection-type 'pipe)))
 
 (defun h/announce-gateway-ready ()
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index a5ad13ee37..5ee8722882 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -52,9 +52,11 @@ Command `hyperdrive-install' installs to this name inside
 `h//gateway-path' looks for executable by this name."
   :type 'string)
 
-(defcustom h/gateway-command-args
-  (format "run --writable true --silent true --port %s" 
hyperdrive-gateway-port)
-  "Arguments passed to the gateway."
+(defcustom h/gateway-command-args "run --writable true --silent true"
+  "Arguments passed to the gateway.
+Note that the \"--port\" argument should not be included here, as
+it is added automatically at runtime using the value of
+`hyperdrive-gateway-port'."
   :type 'string
   :group 'hyperdrive)
 

Reply via email to