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

cargo login should give feedback on success #5868

Closed
simeg opened this issue Aug 5, 2018 · 0 comments · Fixed by #6466
Closed

cargo login should give feedback on success #5868

simeg opened this issue Aug 5, 2018 · 0 comments · Fixed by #6466

Comments

@simeg
Copy link

simeg commented Aug 5, 2018

When running cargo login it asks for a token, and when I provide it with a token, good or bad, it doesn't give me any feedback. As a user I don't know if I inputted the correct token or something went wrong. The status code is 0 both on valid token and invalid token.

$ cargo login
    Updating registry `https://github.com/rust-lang/crates.io-index`
please visit https://crates.io/me and paste the API Token below
[token]

I'd expect cargo to say something. Maybe it can't tell if the token is good or bad at this point of time , but I'd expect it to at least acknowledge that it received my inputted token.

bors added a commit that referenced this issue Dec 20, 2018
Rewrite `login` and registry cleanups.

- Login:
    - Change `login` so that it reads the API host from the registry config so it knows the `{api}/me` URL to display.
    - The `--host` flag is deprecated/unused. It wasn't used for much before.
    - `--registry` supports interactive entry of the token (does not require it on the command line).
    - Displays a message after saving the token (fixes #5868).
    - Because `login` now requires an index, some of the tests had to be updated.
- Fix so that if `api` is missing from the config, it will display a nice error message instead of panicking with unwrap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants