branch: elpa/geiser-guile
commit cfd9116dcb246126950d7f2f662f09149684128b
Author: jao <j...@gnu.org>
Commit: jao <j...@gnu.org>

    Ensure sane shell command switch during version checks
    
    See discussion in issue #13
---
 geiser-guile.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/geiser-guile.el b/geiser-guile.el
index 9ebe4d6e25..3a235c5643 100644
--- a/geiser-guile.el
+++ b/geiser-guile.el
@@ -457,10 +457,12 @@ This function uses `geiser-guile-init-file' if it exists."
 (defun geiser-guile--version (_binary)
   "Find Guile's version running the configured Guile binary."
   ;; maybe one day we'll have `process-lines' with tramp support
-  (shell-command-to-string
-   (format "%s -c %s"
-           (geiser-guile--binary)
-           (shell-quote-argument "(display (version))"))))
+  (let ((shell-command-switch "-c")
+        (shell-file-name "sh"))
+    (shell-command-to-string
+     (format "%s -c %s"
+             (geiser-guile--binary)
+             (shell-quote-argument "(display (version))")))))
 
 (defun geiser-guile-update-warning-level ()
   "Update the warning level used by the REPL.

Reply via email to