Multicommand actions should now work

This commit is contained in:
Beefki
2017-10-15 10:22:05 -05:00
parent d87d36af3f
commit 985c53237c
3 changed files with 96 additions and 80 deletions

View File

@ -7,7 +7,7 @@ use management::Management;
mod config;
use config::Config;
use std::process::{Command, Child};
use std::process::{Command};//, Child};
use std::io;
use std::path::Path;
@ -22,8 +22,9 @@ fn main() {
if Path::new("default.conf").is_file() {
let pac = read_default();
let mut child = config.run(pac);
child.wait().expect("Failed to wait on child");
config.run(pac);
//let mut child = config.run(pac);
//child.wait().expect("Failed to wait on child");
std::process::exit(0);
}
@ -32,8 +33,8 @@ fn main() {
let aptget = PackageManager::apt();
let xbps = PackageManager::xbps();
let managers: Vec<PackageManager> = vec![pacmatic, pacman, aptget, xbps];
//let managers: Vec<PackageManager> = vec![pacmatic];
let mut found: bool = false;
for prog in managers {
@ -64,8 +65,11 @@ fn main() {
}
}
/*
let mut child = config.run(prog);
child.wait().expect("Failed to wait on child");
*/
config.run(prog);
}
}
}