Fix cargo install --index when used with registry.default#11302
Fix cargo install --index when used with registry.default#11302bors merged 1 commit intorust-lang:masterfrom
Conversation
|
r? @weihanglo (rustbot has picked a reviewer for you, use r? to override) |
|
You have pointed out before that |
weihanglo
left a comment
There was a problem hiding this comment.
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 |
weihanglo
left a comment
There was a problem hiding this comment.
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.defaultcauses theargs.registrycall to return the default registry as if it were passed through--registry, which leaves the--indexargument ignored incargo install, sinceregistryis checked first.Fixes #11301 by checking for
indexbeforeregistry.Note that if you try to pass both
--indexand--registry, then a command-line parser error (correctly) occurs: