|
|
|
@ -268,6 +268,7 @@ impl PacmanSearchBuilder {
|
|
|
|
|
#[derive(Default, Debug, Clone)]
|
|
|
|
|
pub struct PacmanUpgradeBuilder {
|
|
|
|
|
no_confirm: bool,
|
|
|
|
|
quiet: bool,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl PacmanUpgradeBuilder {
|
|
|
|
@ -277,6 +278,12 @@ impl PacmanUpgradeBuilder {
|
|
|
|
|
self
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn quiet(mut self, quiet: bool) -> Self {
|
|
|
|
|
self.quiet = quiet;
|
|
|
|
|
|
|
|
|
|
self
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[tracing::instrument(level = "trace")]
|
|
|
|
|
pub async fn upgrade(self) -> AppResult<()> {
|
|
|
|
|
let mut command = ShellCommand::pacman().elevated().arg("-Syu");
|
|
|
|
@ -285,6 +292,10 @@ impl PacmanUpgradeBuilder {
|
|
|
|
|
command = command.arg("--noconfirm")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if self.quiet {
|
|
|
|
|
command = command.arg("--quiet")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
command.wait_success().await
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|