Skip to content

Commit 46c12e5

Browse files
l4lJoshua Nelson
authored and
Joshua Nelson
committed
Use registry from config, instead of cli argument
1 parent 7742b70 commit 46c12e5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/bin/cratesfyi.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,6 @@ enum BuildSubcommand {
258258
#[structopt(name = "CRATE_VERSION")]
259259
crate_version: Option<String>,
260260

261-
/// Url for registry different from cratesio
262-
#[structopt(name = "CRATE_REGISTRY")]
263-
crate_registry: Option<String>,
264-
265261
/// Build a crate at a specific path
266262
#[structopt(
267263
short = "l",
@@ -308,7 +304,6 @@ impl BuildSubcommand {
308304
Self::Crate {
309305
crate_name,
310306
crate_version,
311-
crate_registry,
312307
local,
313308
} => {
314309
let mut builder = rustwide_builder()?;
@@ -318,12 +313,13 @@ impl BuildSubcommand {
318313
.build_local_package(&path)
319314
.context("Building documentation failed")?;
320315
} else {
316+
let registry_url = ctx.config()?.registry_url.clone();
321317
builder
322318
.build_package(
323319
&crate_name.ok_or_else(|| err_msg("must specify name if not local"))?,
324320
&crate_version
325321
.ok_or_else(|| err_msg("must specify version if not local"))?,
326-
crate_registry
322+
registry_url
327323
.as_ref()
328324
.map(|s| PackageKind::Registry(s.as_str()))
329325
.unwrap_or(PackageKind::CratesIo),

0 commit comments

Comments
 (0)