Add a flag to control Windows update acceptance policy (fix #310)

This commit is contained in:
Roey Darwish Dror
2020-01-30 20:42:49 +02:00
parent b91fa4e26c
commit 8c12707693
4 changed files with 19 additions and 3 deletions

View File

@@ -69,6 +69,7 @@ pub struct ConfigFile {
no_retry: Option<bool>,
run_in_tmux: Option<bool>,
cleanup: Option<bool>,
accept_all_windows_updates: Option<bool>,
only: Option<Vec<Step>>,
}
@@ -346,6 +347,12 @@ impl Config {
self.config_file.assume_yes.unwrap_or(self.opt.yes)
}
/// Whether to accept all Windows updates
#[allow(dead_code)]
pub fn accept_all_windows_updates(&self) -> bool {
self.config_file.accept_all_windows_updates.unwrap_or(true)
}
/// Extra yay arguments
#[cfg(target_os = "linux")]
pub fn yay_arguments(&self) -> &str {