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

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

[nongnu] elpa/inf-ruby 781d677941 4/6: Use call-process-shell-command in


From: ELPA Syncer
Subject: [nongnu] elpa/inf-ruby 781d677941 4/6: Use call-process-shell-command instead of splitting right after concat
Date: Sun, 15 Dec 2024 22:01:49 -0500 (EST)

branch: elpa/inf-ruby
commit 781d677941855f13d980536cde0367819c80d35d
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    Use call-process-shell-command instead of splitting right after concat
    
    Seems more straightforward.
    
    #190
---
 inf-ruby.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 5d7aef2685..b79a18f49d 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -122,7 +122,12 @@ So when used it must include %s.  Set to nil to disable."
 WITH-BUNDLER, the command is wrapped with `bundle exec'."
   (let* ((command (format (or inf-ruby-wrapper-command "%s")
                           (concat (when with-bundler "bundle exec ") "irb 
-v")))
-         (output (car (last (apply #'process-lines (split-string-and-unquote 
command)))))
+         (output
+          (with-output-to-string
+            (let ((status (call-process-shell-command command nil
+                                                      standard-output)))
+              (unless (eql status 0)
+                (error "%s exited with status %s" command status)))))
          (fields (split-string output "[ (]")))
     (if (equal (car fields) "irb")
         (version<= "1.2.0" (nth 1 fields))



reply via email to

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