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

Prevents the link: protocol from crashing when no package.json is used #7337

Merged
merged 2 commits into from Jun 13, 2019

Conversation

arcanis
Copy link
Member

@arcanis arcanis commented Jun 13, 2019

Summary

The current code tries to read the manifest when possible, and fallback to a dummy object otherwise. This behavior is problematic (we should never read from the local manifest, as that makes the exact behavior change depending on the state of the repository), but we won't be able to change it in the 1.x (it will however behave as I described in the 2.x, thanks to the split between link: and portal:).

Test plan

Tests should still pass.

@arcanis arcanis merged commit 2f5c937 into master Jun 13, 2019
@arcanis arcanis deleted the link-no-package branch June 13, 2019 15:13
VincentBailly pushed a commit to VincentBailly/yarn that referenced this pull request Jun 10, 2020
yarnpkg#7337)

* Stops reading the manifest for link: dependencies

* Prevents crashing when the package.json doesnt exist
VincentBailly pushed a commit to VincentBailly/yarn that referenced this pull request Jun 10, 2020
yarnpkg#7337)

* Stops reading the manifest for link: dependencies

* Prevents crashing when the package.json doesnt exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant