-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Improve interaction of the preferLocal
, node
and nodePath
options
#815
Comments
I agree. |
I think the reason for the current situation was due to implementation details. Namely, both features are implemented using the I have created sindresorhus/npm-run-path#17 to see if we could add some options to allow decoupling those two features in |
Right now:
node
istrue
, thenodePath
option is used to create the process.preferLocal
istrue
, thenodePath
option is used in the child process itself.preferLocal
istrue
, local binaries can be run.Using
preferLocal
for2
is a little unexpected. It seems like we should be usingnode: true
instead since this relates to running Node.js and thenodePath
option. Also, running local binaries is rather unrelated to choosing the Node.js version. It is odd to couple them.On the other hand, by making
2
usenode: true
instead, we would be ensuring that thenodePath
option is always used both to create the process and in the child process itself. For example,execaNode()
currently uses thenodePath
option in one case but not the other. Users should expect a consistent Node.js version both in the child process and the "grand-child" processes.What do you think?
The text was updated successfully, but these errors were encountered: