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

Ensure npm scripts find correct meteor executable. #9941

Merged
merged 1 commit into from Jun 5, 2018

Conversation

@benjamn
Copy link
Member

@benjamn benjamn commented Jun 5, 2018

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.

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.
@benjamn benjamn added this to the Release 1.7.1 milestone Jun 5, 2018
@benjamn benjamn self-assigned this Jun 5, 2018
@benjamn benjamn requested review from hwillson and abernix Jun 5, 2018
@benjamn benjamn merged commit 38f570a into devel Jun 5, 2018
20 checks passed
20 checks passed
CLA Author has signed the Meteor CLA.
Details
ci/circleci: Clean Up Your tests passed on CircleCI!
Details
ci/circleci: Docs Your tests passed on CircleCI!
Details
ci/circleci: Get Ready Your tests passed on CircleCI!
Details
ci/circleci: Isolated Tests Your tests passed on CircleCI!
Details
ci/circleci: Test Group 0 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 1 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 10 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 2 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 3 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 4 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 5 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 6 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 7 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 8 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 9 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.