We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 347dba7 commit 91da224Copy full SHA for 91da224
1 file changed
add-node-modules-path.el
@@ -43,8 +43,9 @@ Traverse the directory structure up, until reaching the user's home directory.
43
Any path found is added to the `exec-path'."
44
(interactive)
45
(let* ((file (or (buffer-file-name) default-directory))
46
+ (path (locate-dominating-file file "node_modules"))
47
(home (expand-file-name "~"))
- (root (expand-file-name (locate-dominating-file file "node_modules")))
48
+ (root (and path (expand-file-name path)))
49
(roots '()))
50
(while (and root (not (string= root home)))
51
(let ((bindir (expand-file-name "node_modules/.bin/" root)))
0 commit comments