File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,10 @@ enum BuildSubcommand {
258
258
#[ structopt( name = "CRATE_VERSION" ) ]
259
259
crate_version : Option < String > ,
260
260
261
+ /// Url for registry different from cratesio
262
+ #[ structopt( name = "CRATE_REGISTRY" ) ]
263
+ crate_registry : Option < String > ,
264
+
261
265
/// Build a crate at a specific path
262
266
#[ structopt(
263
267
short = "l" ,
@@ -304,6 +308,7 @@ impl BuildSubcommand {
304
308
Self :: Crate {
305
309
crate_name,
306
310
crate_version,
311
+ crate_registry,
307
312
local,
308
313
} => {
309
314
let mut builder = rustwide_builder ( ) ?;
@@ -313,13 +318,12 @@ impl BuildSubcommand {
313
318
. build_local_package ( & path)
314
319
. context ( "Building documentation failed" ) ?;
315
320
} else {
316
- let registry_url = ctx. config ( ) ?. registry_url . clone ( ) ;
317
321
builder
318
322
. build_package (
319
323
& crate_name. ok_or_else ( || err_msg ( "must specify name if not local" ) ) ?,
320
324
& crate_version
321
325
. ok_or_else ( || err_msg ( "must specify version if not local" ) ) ?,
322
- registry_url
326
+ crate_registry
323
327
. as_ref ( )
324
328
. map ( |s| PackageKind :: Registry ( s. as_str ( ) ) )
325
329
. unwrap_or ( PackageKind :: CratesIo ) ,
You can’t perform that action at this time.
0 commit comments