added --needed flag

i18n
jnats 3 years ago
parent f0e1e8b863
commit d78190b262

@ -100,6 +100,7 @@ pub fn clone(noconfirm: bool, pkg: &str) {
let install_result = Command::new("makepkg") let install_result = Command::new("makepkg")
.arg("-si") .arg("-si")
.arg("--noconfirm") .arg("--noconfirm")
.arg("--needed")
.status(); .status();
match install_result { match install_result {
Ok(_) => { Ok(_) => {
@ -113,6 +114,7 @@ pub fn clone(noconfirm: bool, pkg: &str) {
sec(format!("Installing {} ...", pkg)); sec(format!("Installing {} ...", pkg));
let install_result = Command::new("makepkg") let install_result = Command::new("makepkg")
.arg("-si") .arg("-si")
.arg("--needed")
.status() .status()
.expect("Couldn't call makepkg"); .expect("Couldn't call makepkg");
match install_result.code() { match install_result.code() {

@ -7,6 +7,7 @@ pub fn install(noconfirm: bool, pkg: &str) {
let result = Command::new("pacman") let result = Command::new("pacman")
.arg("-Sy") .arg("-Sy")
.arg("--noconfirm") .arg("--noconfirm")
.arg("--needed")
.args(&pkgs) .args(&pkgs)
.status() .status()
.expect("Couldn't call pacman"); .expect("Couldn't call pacman");
@ -18,6 +19,7 @@ pub fn install(noconfirm: bool, pkg: &str) {
} else { } else {
let result = Command::new("pacman") let result = Command::new("pacman")
.arg("-Sy") .arg("-Sy")
.arg("--needed")
.args(&pkgs) .args(&pkgs)
.status() .status()
.expect("Couldn't call pacman"); .expect("Couldn't call pacman");

Loading…
Cancel
Save