Skip to content

Commit 0f01d61

Browse files
committed
Switch to use registry
1 parent d8cadf5 commit 0f01d61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bin/cargo/commands/install.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ continuous integration systems.",
7575
}
7676

7777
pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
78+
let registry = args.registry(config)?;
79+
7880
config.reload_rooted_at_cargo_home()?;
7981
let mut compile_opts = args.compile_options(config, CompileMode::Build)?;
8082

@@ -103,8 +105,8 @@ pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
103105
} else if krates.is_empty() {
104106
from_cwd = true;
105107
SourceId::for_path(config.cwd())?
106-
} else if let Some(registry) = args.value_of("registry") {
107-
SourceId::alt_registry(config, registry)?
108+
} else if let Some(registry) = registry {
109+
SourceId::alt_registry(config, &registry)?
108110
} else {
109111
SourceId::crates_io(config)?
110112
};

0 commit comments

Comments
 (0)