-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Rewrite login
and registry cleanups.
#6466
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #6469) made this pull request unmergeable. Please resolve the merge conflicts. |
ehuss
force-pushed
the
registry-cleanup
branch
from
December 20, 2018 12:35
87eb3ab
to
70f84bf
Compare
@bors: r+ |
📌 Commit 70f84bf has been approved by |
bors
added a commit
that referenced
this pull request
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.
☀️ Test successful - status-appveyor, status-travis |
bors
added a commit
to rust-lang/rust
that referenced
this pull request
Jan 4, 2019
Update cargo 24 commits in 0d1f1bbeabd5b43a7f3ecfa16540af8e76d5efb4..34320d212dca8cd27d06ce93c16c6151f46fcf2e 2018-12-19 14:45:14 +0000 to 2019-01-03 19:12:38 +0000 - Display environment variables for rustc commands (rust-lang/cargo#6492) - Fix a very minor race condition in `cargo fix`. (rust-lang/cargo#6515) - Add a high-level overview of how `fix` works. (rust-lang/cargo#6516) - Add dependency `registry` to `cargo metadata`. (rust-lang/cargo#6500) - Fix fingerprint calculation for patched deps. (rust-lang/cargo#6493) - serialize version directly (rust-lang/cargo#6512) - use DYLD_FALLBACK_LIBRARY_PATH for dylib_path_envvar on macOS (rust-lang/cargo#6355) - Fix error message when resolving dependencies (rust-lang/cargo#6510) - use PathBuf in cargo metadata (rust-lang/cargo#6511) - Fixed link to testsuite in CONTRIBUTING.md (rust-lang/cargo#6506) - Update display of contents of Cargo.toml (rust-lang/cargo#6501) - Update display of contents of Cargo.toml (rust-lang/cargo#6502) - Fixup cargo install's help message (rust-lang/cargo#6495) - testsuite: Require failing commands to check output. (rust-lang/cargo#6497) - Delete unnecessary 'return' (rust-lang/cargo#6496) - Fix new unused patch warning. (rust-lang/cargo#6494) - Some minor documentation changes. (rust-lang/cargo#6481) - Add `links` to `cargo metadata`. (rust-lang/cargo#6480) - Salvaged semver work (rust-lang/cargo#6476) - Warn on unused patches. (rust-lang/cargo#6470) - don't write a an incorrect rustc version to the fingerprint file (rust-lang/cargo#6473) - Rewrite `login` and registry cleanups. (rust-lang/cargo#6466) - [issue#6461] Fix cargo commands list (rust-lang/cargo#6462) - Restrict registry names to same style as package names. (rust-lang/cargo#6469)
bors
added a commit
that referenced
this pull request
Apr 12, 2023
Use registry.default for login/logout This changes `cargo login` and `cargo logout` to use the registry configured at `registry.default` as the registry instead of crates.io. For `cargo login`, this was an unintentional regression from #6466. The documentation has always stated that it will use the default registry. This makes the command more in line with other registry-involving commands. There are still some inconsistencies. These commands use the default if not specified: * `cargo init` * `cargo new` * `cargo owner` * `cargo search` * `cargo yank` * `cargo publish` uses the default, but will also look at the `publish` field `Cargo.toml` and use that if the registry is not specified. These commands would always use crates.io if `--registry` is not specified: * `cargo login` * `cargo logout` * `cargo install` I'm a bit uncertain how to proceed, since this is technically a breaking change particularly if someone has scripted it. I suspect that the number of users that use `registry.default` is very small, and those that script `cargo login` are even smaller, and thus the intersection is probably small or nonexistent. However, there is some risk here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
login
so that it reads the API host from the registry config so it knows the{api}/me
URL to display.--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).login
now requires an index, some of the tests had to be updated.api
is missing from the config, it will display a nice error message instead of panicking with unwrap.