Skip to content

Commit

Permalink
Switch to use registry
Browse files Browse the repository at this point in the history
  • Loading branch information
cswindle committed Oct 4, 2018
1 parent d8cadf5 commit 0f01d61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bin/cargo/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ continuous integration systems.",
}

pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
let registry = args.registry(config)?;

config.reload_rooted_at_cargo_home()?;
let mut compile_opts = args.compile_options(config, CompileMode::Build)?;

Expand Down Expand Up @@ -103,8 +105,8 @@ 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.value_of("registry") {
SourceId::alt_registry(config, registry)?
} else if let Some(registry) = registry {
SourceId::alt_registry(config, &registry)?
} else {
SourceId::crates_io(config)?
};
Expand Down

0 comments on commit 0f01d61

Please sign in to comment.