emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser-chibi 0272694 05/38: Use (car (process-lines ...))


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-chibi 0272694 05/38: Use (car (process-lines ...)) instead of (shell-command ...)
Date: Sun, 1 Aug 2021 18:26:15 -0400 (EDT)

branch: elpa/geiser-chibi
commit 027269447b7a1a70fe9a5ac53830841551da579c
Author: Jordan Brown <mrhmouse@gmail.com>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    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-chibi.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/elisp/geiser-chibi.el b/elisp/geiser-chibi.el
index cb2577e..acb8b61 100644
--- a/elisp/geiser-chibi.el
+++ b/elisp/geiser-chibi.el
@@ -97,10 +97,9 @@ This function uses `geiser-chibi-init-file' if it exists."
 (defconst geiser-chibi-minimum-version "0.7.3")
 
 (defun geiser-chibi--version (binary)
-  (second (split-string (shell-command-to-string
-                         (format "%s -V"
-                                 (shell-quote-argument binary)))
-                        " ")))
+  (second (split-string
+           (car (process-lines binary "-V"))
+           " ")))
 
 (defun geiser-chibi--startup (remote)
   (let ((geiser-log-verbose-p t))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]