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: gracefully handle nonexistent global installation directory #7640

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

milaninfy
Copy link
Contributor

@milaninfy milaninfy commented Jul 11, 2024

Handle arborist error when loading and checking package in global tree.

@milaninfy milaninfy force-pushed the mm/fix-npx-missing-global-issue branch from bee942e to 29cd179 Compare July 11, 2024 19:28
@milaninfy milaninfy changed the title fix(exec): check if globalPath exists before passing to arborist fix(exec): handle error while checking globally installed package Jul 11, 2024
@milaninfy milaninfy marked this pull request as ready for review July 11, 2024 19:35
@milaninfy milaninfy requested a review from a team as a code owner July 11, 2024 19:35
@wraithgar wraithgar changed the title fix(exec): handle error while checking globally installed package fix: gracefully handle nonexistent global installation directory Jul 11, 2024
@wraithgar wraithgar merged commit 9214be9 into npm:latest Jul 11, 2024
25 checks passed
@github-actions github-actions bot mentioned this pull request Jul 11, 2024
@wraithgar
Copy link
Member

This is needed because the default windows installer of nodejs does not create this directory by default anymore. npm will create it when it is asked to install a package globally, but before that time it doesn't exist.

@hzhang20902
Copy link

I had this issue a few months ago and subsequently the issue thread got tagged in this one that was the git equiv of a twitter feud for a few days 😅 but I'm just wondering:

  • what was the security concern created by this dir being created by default that caused the removing of that action?
  • was that concern due to node creating it as part of its own process to install npm; or npm creating it as part of its own install process?
  • why only the windows version? asking bc I switched from mac this year for a new job

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.

3 participants