branch: elpa/geiser-chicken
commit 26b1f560f7d462992f0ef82dfa6935bc71baebcf
Author: Jordan Brown <[email protected]>
Commit: Jose Antonio Ortega Ruiz <[email protected]>
Use (car (process-lines ...)) instead of (shell-command ...)
`shell-command` assumes Bourne-shell-compatible quoting, which
doesn't work when the user isn't using a Bourne-compatible shell.
Instead of futzing about with quoting, we can just use `process-lines`
to execute a process and pass it arguments directly.
---
elisp/geiser-chicken.el | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/elisp/geiser-chicken.el b/elisp/geiser-chicken.el
index 8c10908..60567b7 100644
--- a/elisp/geiser-chicken.el
+++ b/elisp/geiser-chicken.el
@@ -263,10 +263,7 @@ This function uses `geiser-chicken-init-file' if it
exists."
(defconst geiser-chicken-minimum-version "4.8.0.0")
(defun geiser-chicken--version (binary)
- (shell-command-to-string
- (format "%s -e %s"
- (shell-quote-argument binary)
- (shell-quote-argument "(display (chicken-version))"))))
+ (car (process-lines binary "-e" "(display (chicken-version))")))
(defun connect-to-chicken ()
"Start a Chicken REPL connected to a remote process."