branch: elpa/exec-path-from-shell
commit 3cfedb8791397ed50ee66bc0a7cbee5b9d78245c
Merge: 76cd6e3fa8 699f41edb3
Author: Steve Purcell <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #90 from lassik/error-if-remote
Show error if trying to run from a remote buffer
---
exec-path-from-shell.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/exec-path-from-shell.el b/exec-path-from-shell.el
index 98692b76c1..0e1879989f 100644
--- a/exec-path-from-shell.el
+++ b/exec-path-from-shell.el
@@ -180,6 +180,8 @@ shell-escaped, so they may contain $ etc."
Execute the shell according to `exec-path-from-shell-arguments'.
The result is a list of (NAME . VALUE) pairs."
+ (when (file-remote-p default-directory)
+ (error "You cannot run exec-path-from-shell from a remote buffer (Tramp,
etc.)"))
(let* ((random-default (md5 (format "%s%s%s" (emacs-pid) (random)
(current-time))))
(dollar-names (mapcar (lambda (n) (format "${%s-%s}" n
random-default)) names))
(values (split-string (exec-path-from-shell-printf