branch: elpa/exec-path-from-shell
commit 7552abf032a383ff761e7d90e6b5cbb4658a728a
Merge: 59631fc4756 c00285abbc1
Author: Steve Purcell <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #127 from Gastove/master
Fix Nu error buffer create/delete
---
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 ec4e506bd85..9bf49f8bd41 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -214,10 +214,10 @@ buffer is left undisplayed."
(err-buff-name "*exec-path-from-shell: nushell errors*")
(err-file (make-temp-file err-buff-name)))
(with-temp-buffer
- (kill-buffer err-buff-name)
+ (when (get-buffer err-buff-name) (kill-buffer err-buff-name))
(exec-path-from-shell--debug "Invoking shell %s with args %S" shell
shell-args)
(let ((exit-code (exec-path-from-shell--warn-duration
- (apply #'call-process shell nil '(t err-file) nil
shell-args)))
+ (apply #'call-process shell nil `(t ,err-file) nil
shell-args)))
(err-buff (generate-new-buffer err-buff-name)))
(exec-path-from-shell--debug "Shell printed: %S" (buffer-string))
(with-current-buffer err-buff (insert-file-contents err-file))