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 5e355fbc50 076/114: Merge pull reques


From: ELPA Syncer
Subject: [nongnu] elpa/exec-path-from-shell 5e355fbc50 076/114: Merge pull request #68 from timhillgit/master
Date: Tue, 5 Sep 2023 04:00:02 -0400 (EDT)

branch: elpa/exec-path-from-shell
commit 5e355fbc50913d1ffe48bf86df0bcecd8b369ffb
Merge: 15d07666fb 5736cc87e4
Author: Steve Purcell <steve@sanityinc.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #68 from timhillgit/master
    
    Add sentinel to exec-path-from-shell-printf (closes #41)
---
 exec-path-from-shell.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 3384897516..4637f716e2 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -149,7 +149,7 @@ shell-escaped, so they may contain $ etc."
   (let* ((printf-bin (or (executable-find "printf") "printf"))
          (printf-command
           (concat printf-bin
-                  " '__RESULT\\000" str "' "
+                  " '__RESULT\\000" str "\\000__RESULT' "
                   (mapconcat #'exec-path-from-shell--double-quote args " ")))
          (shell (exec-path-from-shell--shell))
          (shell-args (append exec-path-from-shell-arguments
@@ -165,7 +165,7 @@ shell-escaped, so they may contain $ etc."
           (error "Non-zero exit code from shell %s invoked with args %S.  
Output was:\n%S"
                  shell shell-args (buffer-string))))
       (goto-char (point-min))
-      (if (re-search-forward "__RESULT\0\\(.*\\)" nil t)
+      (if (re-search-forward "__RESULT\0\\(.*\\)\0__RESULT" nil t)
           (match-string 1)
         (error "Expected printf output from shell, but got: %S" 
(buffer-string))))))
 



reply via email to

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