operations/install: support quiet option

i18n
Fries 2 years ago committed by Michal
parent 875a7da0b2
commit 8be997002e

@ -13,6 +13,7 @@ pub struct PacmanInstallBuilder {
files: Vec<PathBuf>,
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<I: IntoIterator<Item = S>, 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")
}

Loading…
Cancel
Save