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

[BUG] Hitting Ctrl + C does not kill the polling of the CLI in the first go while logging in #5231

Closed
2 tasks done
neeldani opened this issue Jul 28, 2022 · 0 comments · Fixed by #5243
Closed
2 tasks done
Assignees
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release

Comments

@neeldani
Copy link
Contributor

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

When the user logs in ia the CLI using the flag --auth-type=web, the user is prompted to hit "Enter" to open the link in the browser. However, if the user changes their mind and wishes to kill the polling of the CLI, they need to hit "Ctrl + C" twice to kill the process.

I suspect that the CLI is waiting for the user to hit "Enter" and hence it does not recognise the "Ctrl + C" the first time.

Expected Behavior

Hitting "Ctrl + C" the first time should kill the CLI polling

Steps To Reproduce

  1. Use CLI version 8.15.0
  2. Run npm login --auth-type=web
    3.Hit "Ctrl + C". This will not do anything
  3. Hit "Ctrl + C" again. Now the polling of the CLI is killed.

Environment

  • npm: 8.15.0
  • Node.js: v17.9.1
  • OS Name: MacOS Monterey v12.4
  • System Model Name:
  • npm config: Macbook Pro, 2019
; "user" config from /Users/neeldani/.npmrc

@npm:registry = "https://npm.pkg.github.com" 
//npm.pkg.github.com/:_authToken = (protected) 
//registry.npmjs.org/:_authToken = (protected) 

; node bin location = /Users/neeldani/Library/Application Support/fnm/node-versions/v17.9.1/installation/bin/node
; node version = v17.9.1
; npm local prefix = /Users/neeldani/npm-packages-test/neel-package-prod
; npm version = 8.15.0
; cwd = /Users/neeldani/npm-packages-test/neel-package-prod
; HOME = /Users/neeldani
; Run `npm config ls -l` to show all defaults.
@neeldani neeldani added Release 8.x work is associated with a specific npm 8 release Bug thing that needs fixing Needs Triage needs review for next steps labels Jul 28, 2022
@nlf nlf closed this as completed in #5243 Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant