Add ability to disable remotes
This commit is contained in:
@@ -23,6 +23,7 @@ lazy_static! {
|
|||||||
m.insert("emacs", Step::Emacs);
|
m.insert("emacs", Step::Emacs);
|
||||||
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);
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
m.insert("powershell", Step::Powershell);
|
m.insert("powershell", Step::Powershell);
|
||||||
@@ -46,6 +47,8 @@ pub enum Step {
|
|||||||
Gem,
|
Gem,
|
||||||
/// Don't upgrade SDKMAN! and its packages
|
/// Don't upgrade SDKMAN! and its packages
|
||||||
Sdkman,
|
Sdkman,
|
||||||
|
/// Don't run remote Togprades
|
||||||
|
Remotes,
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
/// Don't update Powershell modules
|
/// Don't update Powershell modules
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ fn run() -> Result<(), Error> {
|
|||||||
execute(&mut report, "WSL", || windows::run_wsl_topgrade(run_type), true)?;
|
execute(&mut report, "WSL", || windows::run_wsl_topgrade(run_type), true)?;
|
||||||
|
|
||||||
if let Some(topgrades) = config.remote_topgrades() {
|
if let Some(topgrades) = config.remote_topgrades() {
|
||||||
|
if config.should_run(Step::Remotes) {
|
||||||
for remote_topgrade in topgrades {
|
for remote_topgrade in topgrades {
|
||||||
execute(
|
execute(
|
||||||
&mut report,
|
&mut report,
|
||||||
@@ -141,6 +142,7 @@ fn run() -> Result<(), Error> {
|
|||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
let distribution = linux::Distribution::detect();
|
let distribution = linux::Distribution::detect();
|
||||||
|
|||||||
Reference in New Issue
Block a user