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

Friendly name package resolution fails if npm is not installed #461

Closed
tevanoff opened this issue Aug 16, 2022 · 1 comment
Closed

Friendly name package resolution fails if npm is not installed #461

tevanoff opened this issue Aug 16, 2022 · 1 comment

Comments

@tevanoff
Copy link

tevanoff commented Aug 16, 2022

Hello! An issue was recently reported on the Heroku CLI that we traced back to a subtle bug that was introduced in #283

That change assumes that the npm command exists on the system. If that's not the case, as is possible with some Heroku CLI installs that bundle a version of node, the friendly name resolution will silently fail. When this happens, it can result in the entirely wrong package being installed as a plugin, which can fail in various ways that are not apparent and are hard to debug.

Here's the CLI issue for more context: heroku/cli#2034

What do you think about explicitly raising an exception if npm does not exist to make the dependency clear? Or, would it make sense to fall back to the https version of the check to avoid the dependency when it's not necessary?

Thanks!

@mdonnalley
Copy link
Contributor

@tevanoff Thanks for finding the issue. We don't have bandwidth to prioritize a fix for this now but we're always happy to review and merge PRs if you'd like to submit one

@mdonnalley mdonnalley closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 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

No branches or pull requests

2 participants