Add flags to disable rust and cargo (fix #200)
This commit is contained in:
@@ -24,6 +24,8 @@ lazy_static! {
|
|||||||
m.insert("gem", Step::Gem);
|
m.insert("gem", Step::Gem);
|
||||||
m.insert("sdkman", Step::Sdkman);
|
m.insert("sdkman", Step::Sdkman);
|
||||||
m.insert("remotes", Step::Remotes);
|
m.insert("remotes", Step::Remotes);
|
||||||
|
m.insert("rustup", Step::Rustup);
|
||||||
|
m.insert("cargo", Step::Cargo);
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
m.insert("powershell", Step::Powershell);
|
m.insert("powershell", Step::Powershell);
|
||||||
@@ -49,6 +51,10 @@ pub enum Step {
|
|||||||
Sdkman,
|
Sdkman,
|
||||||
/// Don't run remote Togprades
|
/// Don't run remote Togprades
|
||||||
Remotes,
|
Remotes,
|
||||||
|
/// Don't run Rustup
|
||||||
|
Rustup,
|
||||||
|
/// Don't run Cargo
|
||||||
|
Cargo,
|
||||||
/// Don't update Powershell modules
|
/// Don't update Powershell modules
|
||||||
Powershell,
|
Powershell,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -278,18 +278,23 @@ fn run() -> Result<(), Error> {
|
|||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.should_run(Step::Rustup) {
|
||||||
execute(
|
execute(
|
||||||
&mut report,
|
&mut report,
|
||||||
"rustup",
|
"rustup",
|
||||||
|| generic::run_rustup(&base_dirs, run_type),
|
|| generic::run_rustup(&base_dirs, run_type),
|
||||||
config.no_retry(),
|
config.no_retry(),
|
||||||
)?;
|
)?;
|
||||||
|
}
|
||||||
|
|
||||||
|
if config.should_run(Step::Cargo) {
|
||||||
execute(
|
execute(
|
||||||
&mut report,
|
&mut report,
|
||||||
"cargo",
|
"cargo",
|
||||||
|| generic::run_cargo_update(run_type),
|
|| generic::run_cargo_update(run_type),
|
||||||
config.no_retry(),
|
config.no_retry(),
|
||||||
)?;
|
)?;
|
||||||
|
}
|
||||||
|
|
||||||
if config.should_run(Step::Emacs) {
|
if config.should_run(Step::Emacs) {
|
||||||
execute(&mut report, "Emacs", || emacs.upgrade(run_type), config.no_retry())?;
|
execute(&mut report, "Emacs", || emacs.upgrade(run_type), config.no_retry())?;
|
||||||
|
|||||||
Reference in New Issue
Block a user