doesnt randomly error even if package is not in overrides and prints proper package when adding to database

i18n
Amy 3 years ago
parent 94af1ffe75
commit 9537dee253
No known key found for this signature in database
GPG Key ID: 6672E6DD65BEA50B

@ -119,8 +119,8 @@ pub fn add_pkg(from_repo: bool, pkgs: &[&str]) {
pkg, "from_repo" pkg, "from_repo"
)); ));
match result { match result {
Ok(_) => inf(format!("Added {} to database", package_name)), Ok(_) => inf(format!("Added {} to database", pkg)),
Err(_) => err_unrec(format!("Couldn't add {} to database", package_name)), Err(_) => err_unrec(format!("Couldn't add {} to database", pkg)),
} }
} }
} }

@ -46,7 +46,9 @@ pub fn uninstall(noconfirm: bool, pkgs: Vec<String>) {
} }
} }
} }
if !matches.is_empty() {
err_unrec(format!("The action you called for tries to uninstall packages: {} . This is disallowed by default as these are important system packages. If you fully know what you are doing and would like to uninstall these, please create an override in /etc/ame/overrides.conf.", matches.join(" "))); err_unrec(format!("The action you called for tries to uninstall packages: {} . This is disallowed by default as these are important system packages. If you fully know what you are doing and would like to uninstall these, please create an override in /etc/ame/overrides.conf.", matches.join(" ")));
}
if noconfirm { if noconfirm {
let result = Command::new("pacman") let result = Command::new("pacman")

Loading…
Cancel
Save