Ensure npm scripts find correct meteor executable. #9941
In my local development environment, the
If I run
~/.meteor/meteor npm test
This commit fixes that problem by prepending the directory that contains the
In my local development environment, the `meteor` command resolves to my Meteor checkout, and I use `~/.meteor/meteor` explicitly when I want to run a released version of Meteor. If I run ~/.meteor/meteor npm test and the `package.json` file defines an npm `test` script that refers to `meteor`, in my environment this `meteor` won't be the same as the one I used to run `~/.meteor/meteor npm test`, which can introduce weirdness such as pinning the versions of packages in `meteor/packages/non-core`, and all the usual Meteor version inconsistency risks. This commit fixes that problem by prepending the directory that contains the `meteor` (or `meteor.bat`) executable to the `PATH` before running `meteor npm ...` commands.