Skip to content

[BUG] url prompt opener does not handle missing opener command #7002

Closed
GulajavaMinistudio/cli
#82
@wraithgar

Description

@wraithgar

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

In an environment (such as GitHub codespaces) that does not have a working opener (in this case, xdg-open) the error is not caught gracefully by npm when trying to open the url.

This is similiar to the bug that was just fixed in npm repo for the same case. There are two times npm opens urls, and only the non-prompting one was fixed.

Expected Behavior

npm may not be able to show a different message here, but it can catch the error and tell the user to manually go to the url.

Steps To Reproduce

  1. Load up codespaces
  2. Run npm login
  3. Hit enter to have npm try to open the web auth url
  4. See error...

Environment

  • npm: 10.2.4
  • Node.js: 20.9.0
  • OS Name: codespaces (linux)
  • npm config is not relevant here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions