We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91da224 commit 6f76b46Copy full SHA for 6f76b46
add-node-modules-path.el
@@ -47,11 +47,13 @@ Any path found is added to the `exec-path'."
47
(home (expand-file-name "~"))
48
(root (and path (expand-file-name path)))
49
(roots '()))
50
- (while (and root (not (string= root home)))
+ (while root
51
(let ((bindir (expand-file-name "node_modules/.bin/" root)))
52
(when (file-directory-p bindir)
53
(add-to-list 'roots bindir)))
54
- (setq root (directory-file-name (file-name-directory root))))
+ (if (string= root home)
55
+ (setq root nil)
56
+ (setq root (directory-file-name (file-name-directory root)))))
57
(if roots
58
(progn
59
(make-local-variable 'exec-path)
0 commit comments