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 {
93
93
) ]
94
94
preserve_target : bool ,
95
95
96
- #[ structopt(
97
- long = "with-cargo" ,
98
- help = "Download cargo [default: installed cargo]"
99
- ) ]
100
- with_cargo : bool ,
101
-
102
96
#[ structopt( long = "with-src" , help = "Download rust-src [default: no download]" ) ]
103
97
with_src : bool ,
104
98
@@ -157,6 +151,12 @@ struct Opts {
157
151
parse( from_os_str)
158
152
) ]
159
153
script : Option < PathBuf > ,
154
+
155
+ #[ structopt(
156
+ long = "without-cargo" ,
157
+ help = "Do not install cargo [default: install cargo]"
158
+ ) ]
159
+ without_cargo : bool ,
160
160
}
161
161
162
162
pub type GitDate = Date < Utc > ;
Original file line number Diff line number Diff line change @@ -231,7 +231,11 @@ impl Toolchain {
231
231
. map_err ( InstallError :: Download ) ?;
232
232
}
233
233
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 {
235
239
let filename = format ! ( "cargo-nightly-{}" , self . host) ;
236
240
download_tarball (
237
241
& client,
@@ -407,8 +411,8 @@ pub(crate) struct DownloadParams {
407
411
url_prefix : String ,
408
412
tmp_dir : PathBuf ,
409
413
install_dir : PathBuf ,
410
- install_cargo : bool ,
411
414
install_src : bool ,
415
+ without_cargo : bool ,
412
416
force_install : bool ,
413
417
}
414
418
@@ -432,8 +436,8 @@ impl DownloadParams {
432
436
url_prefix,
433
437
tmp_dir : cfg. rustup_tmp_path . clone ( ) ,
434
438
install_dir : cfg. toolchains_path . clone ( ) ,
435
- install_cargo : cfg. args . with_cargo ,
436
439
install_src : cfg. args . with_src ,
440
+ without_cargo : cfg. args . without_cargo ,
437
441
force_install : cfg. args . force_install ,
438
442
}
439
443
}
You can’t perform that action at this time.
0 commit comments