Skip to content

fix(did-you-mean): succeed if cwd is not a package - #3747

Merged
wraithgar merged 1 commit into
release-nextfrom
gar/dym-no-pkg
Sep 13, 2021
Merged

fix(did-you-mean): succeed if cwd is not a package#3747
wraithgar merged 1 commit into
release-nextfrom
gar/dym-no-pkg

Conversation

@wraithgar

Copy link
Copy Markdown
Contributor

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

@nlf nlf left a comment

Copy link
Copy Markdown
Contributor

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