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 1115e59539 033/114: Provide better in


From: ELPA Syncer
Subject: [nongnu] elpa/exec-path-from-shell 1115e59539 033/114: Provide better info when the shell doesn't printf vars as expected
Date: Tue, 5 Sep 2023 03:59:58 -0400 (EDT)

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

    Provide better info when the shell doesn't printf vars as expected
    
    See #11
---
 exec-path-from-shell.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 5d3f3851e6..f5952bf58f 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -115,8 +115,9 @@ shell-escaped, so they may contain $ etc."
       (apply #'call-process
              (getenv "SHELL") nil (current-buffer) nil shell-args)
       (goto-char (point-min))
-      (when (re-search-forward "__RESULT\0\\(.*\\)" nil t)
-        (match-string 1)))))
+      (if (re-search-forward "__RESULT\0\\(.*\\)" nil t)
+          (match-string 1)
+        (error "Expected printf output from shell, but got: %s" 
(buffer-string))))))
 
 (defun exec-path-from-shell-getenvs (names)
   "Get the environment variables with NAMES from the user's shell.



reply via email to

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