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

Minor Bug: Fix error on accessing empty releaseRecordForConstraints var #7276


Copy link

@TomFreudenberg TomFreudenberg commented Jun 23, 2016

Minor bug from 4commerce-technologies-AG#49:

When running meteor from checkout (as we do for the ARM fork) and use meteor update or meteor update --packages-only you will get following error:

      throw error;
TypeError: Cannot read property 'packages' of null
    at [as func] (/tools/cli/commands-packages.js:1721:12)
    at /tools/cli/main.js:1402:23

Steps to reproduce:

cd /tmp

git clone -b release/METEOR@1.3.4 meteor-checkout

meteor-checkout/meteor create hello-world

cd hello-world

../meteor-checkout/meteor update


When running meteor update from checkout the var releaseRecordForConstraints ist set to null in case of if (!files.inCheckout()) - see source lines

It will not get checked later, that this var is null and accessing the instance attribute raise an exception - see source line.


As a proposal I add a check before accessing the null instance.

Thanks for feedback or merge

	When running meteor from checkout this var is defined to be null.
	Accessing var instance attribute will raise an exception
Copy link

@benjamn benjamn commented Jun 23, 2016

This seems safe to me, since it's always possible that releaseRecordForConstraints.packages is empty, which leads to the same behavior (no constraints added).

@benjamn benjamn merged commit 4d145b6 into meteor:devel Jun 23, 2016
3 checks passed
3 checks passed
CLA Author has signed the Meteor CLA.
ci/circleci Your tests passed on CircleCI!
continuous-integration/travis-ci/pr The Travis CI build passed
Copy link
Contributor Author

@TomFreudenberg TomFreudenberg commented Jun 23, 2016

Cool - thanks for merging again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants