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): always save true when installing to npx cache #8154

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

milaninfy
Copy link
Contributor

Override config save to always be true when installing to the npx cache.

fixes: #8151

@milaninfy milaninfy force-pushed the mm/fix-npx-invalid-cache branch from 1549b64 to 7350e96 Compare March 10, 2025 16:48
save: false,
})

t.match(await readOutput('@npmcli-create-index'), {
Copy link
Member

@wraithgar wraithgar Mar 10, 2025

Choose a reason for hiding this comment

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

the test should be the existence of the package.json file. I believe thanks to @owlstronaut there is code in the libnpmexec tests that let you calculate the cache directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added assertion to test existence of package.json file. 👍

@milaninfy milaninfy force-pushed the mm/fix-npx-invalid-cache branch from 875c165 to 02988df Compare March 10, 2025 17:24
@milaninfy milaninfy marked this pull request as ready for review March 11, 2025 00:16
@milaninfy milaninfy requested a review from a team as a code owner March 11, 2025 00:16
@wraithgar wraithgar merged commit 386f328 into npm:latest Mar 12, 2025
16 checks passed
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] since npm 11.2.0 update, npx fails to run http-server
3 participants