diff --git a/src/mods/clone.rs b/src/mods/clone.rs index e1684fa..740dbe1 100644 --- a/src/mods/clone.rs +++ b/src/mods/clone.rs @@ -100,6 +100,7 @@ pub fn clone(noconfirm: bool, pkg: &str) { let install_result = Command::new("makepkg") .arg("-si") .arg("--noconfirm") + .arg("--needed") .status(); match install_result { Ok(_) => { @@ -113,6 +114,7 @@ pub fn clone(noconfirm: bool, pkg: &str) { sec(format!("Installing {} ...", pkg)); let install_result = Command::new("makepkg") .arg("-si") + .arg("--needed") .status() .expect("Couldn't call makepkg"); match install_result.code() { diff --git a/src/mods/install.rs b/src/mods/install.rs index 5f76e4e..1d86e80 100644 --- a/src/mods/install.rs +++ b/src/mods/install.rs @@ -7,6 +7,7 @@ pub fn install(noconfirm: bool, pkg: &str) { let result = Command::new("pacman") .arg("-Sy") .arg("--noconfirm") + .arg("--needed") .args(&pkgs) .status() .expect("Couldn't call pacman"); @@ -18,6 +19,7 @@ pub fn install(noconfirm: bool, pkg: &str) { } else { let result = Command::new("pacman") .arg("-Sy") + .arg("--needed") .args(&pkgs) .status() .expect("Couldn't call pacman");