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(did-you-mean): succeed if cwd is not a package #3747

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

wraithgar
Copy link
Member

The did-you-mean code was trying to parse a local package.json to
suggest scripts and bins, which was causing an exception if you ran npm
outside of a directory with a valid package.json.

This fixes that.

@wraithgar wraithgar requested a review from a team as a code owner September 13, 2021 17:35
Copy link
Contributor

@nlf nlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good fix!

The did-you-mean code was trying to parse a local package.json to
suggest scripts and bins, which was causing an exception if you ran npm
outside of a directory with a valid package.json.

This fixes that.

PR-URL: #3747
Credit: @wraithgar
Close: #3747
Reviewed-by: @nlf
@wraithgar wraithgar merged commit 5974397 into release-next Sep 13, 2021
@wraithgar wraithgar deleted the gar/dym-no-pkg branch September 13, 2021 20:22
@fritzy fritzy mentioned this pull request Sep 16, 2021
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.

2 participants