Right now:
- If the
node is true, the nodePath option is used to create the process.
- If the
preferLocal is true, the nodePath option is used in the child process itself.
- If the
preferLocal is true, local binaries can be run.
Using preferLocal for 2 is a little unexpected. It seems like we should be using node: true instead since this relates to running Node.js and the nodePath 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 use node: true instead, we would be ensuring that the nodePath option is always used both to create the process and in the child process itself. For example, execaNode() currently uses the nodePath 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?
Right now:
nodeistrue, thenodePathoption is used to create the process.preferLocalistrue, thenodePathoption is used in the child process itself.preferLocalistrue, local binaries can be run.Using
preferLocalfor2is a little unexpected. It seems like we should be usingnode: trueinstead since this relates to running Node.js and thenodePathoption. 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
2usenode: trueinstead, we would be ensuring that thenodePathoption is always used both to create the process and in the child process itself. For example,execaNode()currently uses thenodePathoption 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?