From 8be997002e7617d32ee3386783ac7a45f5528509 Mon Sep 17 00:00:00 2001 From: Fries Date: Fri, 16 Sep 2022 23:10:56 -0700 Subject: [PATCH] operations/install: support quiet option --- src/builder/pacman.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/builder/pacman.rs b/src/builder/pacman.rs index 7374c72..17e3a56 100644 --- a/src/builder/pacman.rs +++ b/src/builder/pacman.rs @@ -13,6 +13,7 @@ pub struct PacmanInstallBuilder { files: Vec, as_deps: bool, no_confirm: bool, + quiet: bool, needed: bool, } @@ -21,6 +22,7 @@ impl PacmanInstallBuilder { Self::default() .as_deps(options.asdeps) .no_confirm(options.noconfirm) + .quiet(options.quiet) } pub fn packages, S: ToString>(mut self, packages: I) -> Self { @@ -43,6 +45,12 @@ impl PacmanInstallBuilder { self } + pub fn quiet(mut self, quiet: bool) -> Self { + self.quiet = quiet; + + self + } + #[allow(clippy::wrong_self_convention)] pub fn as_deps(mut self, as_deps: bool) -> Self { self.as_deps = as_deps; @@ -70,6 +78,10 @@ impl PacmanInstallBuilder { command = command.arg("--noconfirm") } + if self.quiet { + command = command.arg("--quiet") + } + if self.as_deps { command = command.arg("--asdeps") }