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: don't prompt on npm exec [directory] #5298

Merged
merged 1 commit into from
Aug 17, 2022
Merged

Conversation

wraithgar
Copy link
Member

@wraithgar wraithgar commented Aug 11, 2022

Local directories have to be "installed" so that their bins are linked
and set up and callable, the user shouldn't need to be prompted to do
that. Note that this does NOT affect anything passed via the
--package param, because that may also contain non-directory specs so
the existing behavior needs to be preserved. This is a small QOL
improvement for the isolated use case of "npm exec [directory]"

This also updates the hashing method used to come up with the .npx
directory to resolve the paths to packages first, so that npm exec .
in different directories don't share the same .npx directory.

@wraithgar wraithgar requested a review from a team as a code owner August 11, 2022 14:28
Local directories have to be "installed" so that their bins are linked
and set up and callable, the user shouldn't need to be prompted to do
that.  Note that this does NOT affect anything passed via the
`--package` param, because that may also contain non-directory specs so
the existing behavior needs to be preserved.  This is a small QOL
improvement for the isolated use case of "npm exec [directory]"

This also updates the hashing method used to come up with the `.npx`
directory to resolve the paths to packages first, so that `npm exec .`
in different directories don't share the same `.npx` directory.
@wraithgar wraithgar changed the title gar/exec directory fix: don't prompt on npm exec [directory] Aug 11, 2022
@wraithgar
Copy link
Member Author

Fixes #3252

Copy link
Contributor

@ruyadorno ruyadorno left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@fritzy fritzy merged commit 6eba131 into latest Aug 17, 2022
@fritzy fritzy deleted the gar/exec-directory branch August 17, 2022 00:58
@fritzy fritzy mentioned this pull request Aug 17, 2022
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.

4 participants