Skip to content

Commit

Permalink
Fix cargo install --index when used with registry.default
Browse files Browse the repository at this point in the history
  • Loading branch information
arlosi committed Oct 27, 2022
1 parent 1985caf commit 93a243f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/cargo/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
} else if krates.is_empty() {
from_cwd = true;
SourceId::for_path(config.cwd())?
} else if let Some(registry) = args.registry(config)? {
SourceId::alt_registry(config, &registry)?
} else if let Some(index) = args.get_one::<String>("index") {
SourceId::for_registry(&index.into_url()?)?
} else if let Some(registry) = args.registry(config)? {
SourceId::alt_registry(config, &registry)?
} else {
SourceId::crates_io(config)?
};
Expand Down

0 comments on commit 93a243f

Please sign in to comment.