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

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

[elpa] externals/systemd fcfd891 3/4: [systemd] Use `process-file' inste


From: Stefan Monnier
Subject: [elpa] externals/systemd fcfd891 3/4: [systemd] Use `process-file' instead of `shell-command'
Date: Tue, 1 Dec 2020 17:28:26 -0500 (EST)

branch: externals/systemd
commit fcfd8913c1f1ba517efd8f94cbd59ad896c81326
Author: Mario Lang <mlang@delysid.org>
Commit: Mario Lang <mlang@delysid.org>

    [systemd] Use `process-file' instead of `shell-command'
---
 systemd.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/systemd.el b/systemd.el
index a7e377c..ac940b1 100644
--- a/systemd.el
+++ b/systemd.el
@@ -74,8 +74,8 @@ on the remote host.  When not specified, the remote system 
bus is used."
           "unix:path=/run/dbus/system_bus_socket")
          (`:session
           (with-temp-buffer
-            (let ((default-directory (concat "/scpx:" host ":/")))
-              (shell-command "[ -e $XDG_RUNTIME_DIR/bus ] && echo -n 
$XDG_RUNTIME_DIR/bus" t)
+            (let ((default-directory (concat "/scpx:" host ":")))
+              (process-file "/bin/sh" nil t nil "-c" "[ -e 
$XDG_RUNTIME_DIR/bus ] && echo -n $XDG_RUNTIME_DIR/bus")
               (when (not (zerop (buffer-size)))
                 (buffer-string)))))
          (_ bus)))



reply via email to

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