branch: elpa/exec-path-from-shell
commit 4f90eff0443aa3b02c4ccd63b9b48cf9bd1be2ab
Author: Steve Purcell <[email protected]>
Commit: Steve Purcell <[email protected]>

    Include shell output in error upon non-zero exit
---
 exec-path-from-shell.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index add66dbe60..75204b0312 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -126,7 +126,8 @@ shell-escaped, so they may contain $ etc."
       (let ((exit-code (apply #'call-process shell nil t nil shell-args)))
         (exec-path-from-shell--debug "Shell printed: %S" (buffer-string))
         (unless (zerop exit-code)
-          (error "Non-zero exit code from shell %s invoked with args %S" shell 
shell-args)))
+          (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)
           (match-string 1)

Reply via email to