Skip to content

Commit 93a243f

Browse files
committed
Fix cargo install --index when used with registry.default
1 parent 1985caf commit 93a243f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/cargo/commands/install.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
126126
} else if krates.is_empty() {
127127
from_cwd = true;
128128
SourceId::for_path(config.cwd())?
129-
} else if let Some(registry) = args.registry(config)? {
130-
SourceId::alt_registry(config, &registry)?
131129
} else if let Some(index) = args.get_one::<String>("index") {
132130
SourceId::for_registry(&index.into_url()?)?
131+
} else if let Some(registry) = args.registry(config)? {
132+
SourceId::alt_registry(config, &registry)?
133133
} else {
134134
SourceId::crates_io(config)?
135135
};

0 commit comments

Comments
 (0)