yarn node sometimes doesn't resolve node.exe to the one Yarn was started with. This has only happened on Windows.
To Reproduce
- Create any new yarn 2 project on Windows.
- Run
yarn node using a predefined path to node.exe and Yarn: e.g. ..\path-to-node\node.exe ..\path-to-yarn\yarn-berry.js node
- If the supplied node.exe is not in the current directory, Yarn will use the first node.exe found in the user's PATH, instead of the one invoked by the user.
This means only this works properly: .\node.exe ..\path-to-yarn\yarn-berry.js node ...
This doesn't (uses node.exe from PATH): ..\any-other-path\node.exe ..\path-to-yarn\yarn-berry.js node ...
Environment
- OS: Windows 10
- Node version: irrelevant
- Yarn version: 2.0.0-rc.30
yarn nodesometimes doesn't resolve node.exe to the one Yarn was started with. This has only happened on Windows.To Reproduce
yarn nodeusing a predefined path to node.exe and Yarn: e.g...\path-to-node\node.exe ..\path-to-yarn\yarn-berry.js nodeThis means only this works properly:
.\node.exe ..\path-to-yarn\yarn-berry.js node ...This doesn't (uses node.exe from PATH):
..\any-other-path\node.exe ..\path-to-yarn\yarn-berry.js node ...Environment