Skip to content

Commit 7552abf

Browse files
authored
Merge pull request #127 from Gastove/master
Fix Nu error buffer create/delete
2 parents 59631fc + c00285a commit 7552abf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exec-path-from-shell.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ buffer is left undisplayed."
214214
(err-buff-name "*exec-path-from-shell: nushell errors*")
215215
(err-file (make-temp-file err-buff-name)))
216216
(with-temp-buffer
217-
(kill-buffer err-buff-name)
217+
(when (get-buffer err-buff-name) (kill-buffer err-buff-name))
218218
(exec-path-from-shell--debug "Invoking shell %s with args %S" shell shell-args)
219219
(let ((exit-code (exec-path-from-shell--warn-duration
220-
(apply #'call-process shell nil '(t err-file) nil shell-args)))
220+
(apply #'call-process shell nil `(t ,err-file) nil shell-args)))
221221
(err-buff (generate-new-buffer err-buff-name)))
222222
(exec-path-from-shell--debug "Shell printed: %S" (buffer-string))
223223
(with-current-buffer err-buff (insert-file-contents err-file))

0 commit comments

Comments
 (0)