File tree 2 files changed +1
-10
lines changed
src/cargo/sources/registry
2 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ impl<'cfg> HttpRegistry<'cfg> {
131
131
config : & ' cfg Config ,
132
132
name : & str ,
133
133
) -> CargoResult < HttpRegistry < ' cfg > > {
134
- if !config. cli_unstable ( ) . sparse_registry {
134
+ if !source_id . is_crates_io ( ) && ! config. cli_unstable ( ) . sparse_registry {
135
135
anyhow:: bail!( "usage of sparse registries requires `-Z sparse-registry`" ) ;
136
136
}
137
137
let url = source_id. url ( ) . as_str ( ) ;
Original file line number Diff line number Diff line change @@ -2703,15 +2703,6 @@ fn http_requires_z_flag() {
2703
2703
. run ( ) ;
2704
2704
}
2705
2705
2706
- #[ cargo_test]
2707
- fn protocol_sparse_requires_z_flag ( ) {
2708
- cargo_process ( "install bar" )
2709
- . with_status ( 101 )
2710
- . env ( "CARGO_REGISTRIES_CRATES_IO_PROTOCOL" , "sparse" )
2711
- . with_stderr ( "[ERROR] usage of sparse registries requires `-Z sparse-registry`" )
2712
- . run ( )
2713
- }
2714
-
2715
2706
#[ cargo_test]
2716
2707
fn protocol ( ) {
2717
2708
cargo_process ( "install bar" )
You can’t perform that action at this time.
0 commit comments