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

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

[nongnu] elpa/exec-path-from-shell 9f034cdb97 022/114: Explicitly double


From: ELPA Syncer
Subject: [nongnu] elpa/exec-path-from-shell 9f034cdb97 022/114: Explicitly double-quote args, so empty var values don't mess things up
Date: Tue, 5 Sep 2023 03:59:57 -0400 (EDT)

branch: elpa/exec-path-from-shell
commit 9f034cdb97fb00044470084473bcb99b8a5b7d2d
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>

    Explicitly double-quote args, so empty var values don't mess things up
    
    Fixes #6
---
 exec-path-from-shell.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 8640d491e1..188c18cb2b 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -79,7 +79,9 @@ ARGS is an optional list of args which will be inserted by 
printf
 in place of any % placeholders in STR.  ARGS are not automatically
 shell-escaped, so that may contain $ etc."
   (let ((printf-command (concat "printf '__RESULT\\000" str "' "
-                                (mapconcat #'identity args " "))))
+                                (mapconcat (lambda (a) (concat "\"" a "\""))
+                                           args
+                                           " "))))
     (with-temp-buffer
       (call-process (getenv "SHELL") nil (current-buffer) nil
                     "--login" "-i" "-c" printf-command)



reply via email to

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