File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff 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 ) ,
You can’t perform that action at this time.
0 commit comments