Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jenv's sbt plugin conflicts with nodenv #340

Open
Atry opened this issue Nov 4, 2021 · 0 comments
Open

jenv's sbt plugin conflicts with nodenv #340

Atry opened this issue Nov 4, 2021 · 0 comments

Comments

@Atry
Copy link
Contributor

Atry commented Nov 4, 2021

Suppose you installed both sbt and node in Homebrew, say, under /opt/homebrew/bin. When nodenv is initialized without jenv, the $PATH would be ~/.nodenv/shims/node:/opt/homebrew/bin, therefore node is resolved as ~/.nodenv/shims/node, which is expected.

Unfortunately, when jenv's sbt plugin is enabled, jenv will prepend the path containing sbt to $PATH, which is /opt/homebrew/bin, therefore the $PATH becomes ~/.jenv/versions/10.0/bin:/opt/homebrew/bin:/opt/homebrew/Cellar/jenv/0.5.4/libexec/libexec:~/.nodenv/shims:/opt/homebrew/bin while sbt is running. As a result, if sbt internally invoke node, it is resolved as /opt/homebrew/bin/node, which is unexpected.

This bug affects sbt Scala.js projects using both nodenv and jenv, because sbt will launch node to run tests in these projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant