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("sdkman", Step::Sdkman);
|
||||
m.insert("remotes", Step::Remotes);
|
||||
m.insert("rustup", Step::Rustup);
|
||||
m.insert("cargo", Step::Cargo);
|
||||
|
||||
#[cfg(windows)]
|
||||
m.insert("powershell", Step::Powershell);
|
||||
@@ -49,6 +51,10 @@ pub enum Step {
|
||||
Sdkman,
|
||||
/// Don't run remote Togprades
|
||||
Remotes,
|
||||
/// Don't run Rustup
|
||||
Rustup,
|
||||
/// Don't run Cargo
|
||||
Cargo,
|
||||
/// Don't update Powershell modules
|
||||
Powershell,
|
||||
}
|
||||
|
||||
@@ -278,18 +278,23 @@ fn run() -> Result<(), Error> {
|
||||
)?;
|
||||
}
|
||||
|
||||
if config.should_run(Step::Rustup) {
|
||||
execute(
|
||||
&mut report,
|
||||
"rustup",
|
||||
|| generic::run_rustup(&base_dirs, run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
}
|
||||
|
||||
if config.should_run(Step::Cargo) {
|
||||
execute(
|
||||
&mut report,
|
||||
"cargo",
|
||||
|| generic::run_cargo_update(run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
}
|
||||
|
||||
if config.should_run(Step::Emacs) {
|
||||
execute(&mut report, "Emacs", || emacs.upgrade(run_type), config.no_retry())?;
|
||||
|
||||
Reference in New Issue
Block a user