-
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
Fix cargo install --index when used with registry.default #11302
Conversation
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
You have pointed out before that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine. And I agree with Eh2406. We might want some tests against registry.default
. Or at least posting an issue calling out for help.
A bit off-topic. I wonder if Footnotes
|
93a243f
to
24bf873
Compare
Added a test and changed the implementation strategy slightly. There are complications when trying to add a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not entirely sold but yup we can proceed first. I'll create an issue for exploring a way to make it more future-proof. Thank you for fixing this :)
@bors r+ |
☀️ Test successful - checks-actions |
3 commits in 16b097879b6f117c8ae698aab054c87f26ff325e..eb5d35917b2395194593c9ca70c3778f60c1573b 2022-11-14 23:28:16 +0000 to 2022-11-17 22:08:43 +0000 - Fix several tests that are waiting 60 seconds for publishing to time out (rust-lang/cargo#11388) - Implement RFC 3139: alternative registry authentication support (rust-lang/cargo#10592) - Fix cargo install --index when used with registry.default (rust-lang/cargo#11302)
Update cargo 3 commits in 16b097879b6f117c8ae698aab054c87f26ff325e..eb5d35917b2395194593c9ca70c3778f60c1573b 2022-11-14 23:28:16 +0000 to 2022-11-17 22:08:43 +0000 - Fix several tests that are waiting 60 seconds for publishing to time out (rust-lang/cargo#11388) - Implement RFC 3139: alternative registry authentication support (rust-lang/cargo#10592) - Fix cargo install --index when used with registry.default (rust-lang/cargo#11302) r? `@ghost`
Setting
registry.default
causes theargs.registry
call to return the default registry as if it were passed through--registry
, which leaves the--index
argument ignored incargo install
, sinceregistry
is checked first.Fixes #11301 by checking for
index
beforeregistry
.Note that if you try to pass both
--index
and--registry
, then a command-line parser error (correctly) occurs: