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

fix(npx): look for bins in local package.json #5832

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

wraithgar
Copy link
Member

@wraithgar wraithgar commented Nov 9, 2022

Closes #5777

@wraithgar wraithgar requested a review from a team as a code owner November 9, 2022 18:22
@lukekarrys lukekarrys merged commit ed8cf08 into latest Nov 9, 2022
@lukekarrys lukekarrys deleted the gar/npx-self-reference branch November 9, 2022 18:40
@github-actions github-actions bot mentioned this pull request Nov 9, 2022
@ljharb
Copy link
Contributor

ljharb commented Nov 9, 2022

@wraithgar <3 thank you!

what are the chances of getting this in the next release of v8, whenever that happens for other reasons?

@wraithgar
Copy link
Member Author

This commit won't work in v8 because it uses optional chaining.

@ljharb
Copy link
Contributor

ljharb commented Nov 9, 2022

ok sure, but that line could change from if (localManifest?.bin?.[args[0]]) { to if (localManifest && localManifest.bin && localManifest.bin[args[0]]) { and it'd work the same.

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.

[BUG] exec/npx: npm v8.8+/9+ break with a self-reference
3 participants