Skip to content

Commit

Permalink
Guard against nonexistent default directory
Browse files Browse the repository at this point in the history
Fixes #34.

Modified-by: Jonas Bernoulli <jonas@bernoul.li>
  • Loading branch information
phst authored and tarsius committed Aug 17, 2017
1 parent b591c28 commit 2417261
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions with-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ please see https://github.com/magit/magit/wiki/Emacsclient."))))
(with-editor-locate-emacsclient-1 path (1- depth))))))

(defun with-editor-emacsclient-version (exec)
(ignore-errors
(cadr (split-string (car (process-lines exec "--version"))))))
(let ((default-directory (file-name-directory exec)))
(ignore-errors
(cadr (split-string (car (process-lines exec "--version")))))))

(defun with-editor-emacsclient-path ()
(let ((path exec-path))
Expand Down

0 comments on commit 2417261

Please sign in to comment.