Add a key for running remote topgrades

This commit is contained in:
Roey Darwish Dror
2019-06-05 14:15:45 +03:00
parent 232c886be6
commit 4a7218293b
5 changed files with 37 additions and 3 deletions

View File

@@ -1,5 +1,4 @@
#![allow(clippy::cognitive_complexity)]
mod config;
mod ctrlc;
mod error;
@@ -132,6 +131,17 @@ fn run() -> Result<(), Error> {
#[cfg(windows)]
execute(&mut report, "WSL", || windows::run_wsl_topgrade(run_type), true)?;
if let Some(topgrades) = config.remote_topgrades() {
for remote_topgrade in topgrades {
execute(
&mut report,
remote_topgrade,
|| generic::run_remote_topgrade(run_type, remote_topgrade),
config.no_retry(),
)?;
}
}
#[cfg(target_os = "linux")]
let distribution = linux::Distribution::detect();