|
|
@ -61,8 +61,7 @@ pub fn uninstall(noconfirm: bool, pkgs: Vec<String>) { // uninstall a package
|
|
|
|
|
|
|
|
|
|
|
|
pub fn uninstall_from_file(noconfirm: bool, file: &str) { // uninstall a package from a list of packages
|
|
|
|
pub fn uninstall_from_file(noconfirm: bool, file: &str) { // uninstall a package from a list of packages
|
|
|
|
let mut pkgs: Vec<String> = Vec::new();
|
|
|
|
let mut pkgs: Vec<String> = Vec::new();
|
|
|
|
let mut contents = String::new();
|
|
|
|
let contents = std::fs::read_to_string(&file).expect("Couldn't read file");
|
|
|
|
contents = std::fs::read_to_string(&file).expect("Couldn't read file");
|
|
|
|
|
|
|
|
for line in contents.lines() {
|
|
|
|
for line in contents.lines() {
|
|
|
|
pkgs.push(line.to_string());
|
|
|
|
pkgs.push(line.to_string());
|
|
|
|
}
|
|
|
|
}
|
|
|
|