File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -93,12 +93,6 @@ struct Opts {
9393 ) ]
9494 preserve_target : bool ,
9595
96- #[ structopt(
97- long = "with-cargo" ,
98- help = "Download cargo [default: installed cargo]"
99- ) ]
100- with_cargo : bool ,
101-
10296 #[ structopt( long = "with-src" , help = "Download rust-src [default: no download]" ) ]
10397 with_src : bool ,
10498
@@ -157,6 +151,12 @@ struct Opts {
157151 parse( from_os_str)
158152 ) ]
159153 script : Option < PathBuf > ,
154+
155+ #[ structopt(
156+ long = "without-cargo" ,
157+ help = "Do not install cargo [default: install cargo]"
158+ ) ]
159+ without_cargo : bool ,
160160}
161161
162162pub type GitDate = Date < Utc > ;
Original file line number Diff line number Diff line change @@ -231,7 +231,11 @@ impl Toolchain {
231231 . map_err ( InstallError :: Download ) ?;
232232 }
233233
234- if dl_params. install_cargo {
234+ // download cargo by default
235+ // deactivate with the `--without-cargo` flag
236+ // this default behavior was changed as of v0.6.0
237+ // see: https://github.com/rust-lang/cargo-bisect-rustc/issues/81
238+ if !dl_params. without_cargo {
235239 let filename = format ! ( "cargo-nightly-{}" , self . host) ;
236240 download_tarball (
237241 & client,
@@ -407,8 +411,8 @@ pub(crate) struct DownloadParams {
407411 url_prefix : String ,
408412 tmp_dir : PathBuf ,
409413 install_dir : PathBuf ,
410- install_cargo : bool ,
411414 install_src : bool ,
415+ without_cargo : bool ,
412416 force_install : bool ,
413417}
414418
@@ -432,8 +436,8 @@ impl DownloadParams {
432436 url_prefix,
433437 tmp_dir : cfg. rustup_tmp_path . clone ( ) ,
434438 install_dir : cfg. toolchains_path . clone ( ) ,
435- install_cargo : cfg. args . with_cargo ,
436439 install_src : cfg. args . with_src ,
440+ without_cargo : cfg. args . without_cargo ,
437441 force_install : cfg. args . force_install ,
438442 }
439443 }
You can’t perform that action at this time.
0 commit comments