Multicommand actions should now work
This commit is contained in:
12
src/main.rs
12
src/main.rs
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user