diff --git a/bin/blackarch-devtools b/bin/blackarch-devtools index d305966..e9c1455 100755 Binary files a/bin/blackarch-devtools and b/bin/blackarch-devtools differ diff --git a/src/cli.yml b/src/cli.yml index 3a5277f..ee22067 100644 --- a/src/cli.yml +++ b/src/cli.yml @@ -37,8 +37,9 @@ args: - executable: short: e long: executable - help: Name of the binary file provided by the package that you're installing in the chroot environment. + help: Execute the command to test the package in the chroot environment. takes_value: true + multiple: true requires: - test - package diff --git a/src/functions.rs b/src/functions.rs index d453135..5af409f 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -356,7 +356,7 @@ pub fn test_package(package: &str, executable: &str) { ) .unwrap(); Command::new("sudo") - .args(&[&devtools_nspawn, &chroot_blackarch, executable]) + .args(&[&devtools_nspawn, &chroot_blackarch, "sh", "-c", &executable]) .status() .expect( "Something went wrong while trying to execute the binary in the chroot environment.", diff --git a/src/main.rs b/src/main.rs index c1c0f03..84079fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,11 +20,8 @@ fn main() { .value_of("package") .expect("Failed to convert in a valid String") .to_string(); - let executable = matches - .value_of("executable") - .expect("Failed to convert in a valid String") - .to_string(); - functions::test_package(&package, &executable); + let executable: Vec<&str> = matches.values_of("executable").unwrap().collect(); + functions::test_package(&package, &executable.join(" ")); } else if matches.is_present("install-missing") { let missing_deps: Vec<&str> = matches.values_of("install-missing").unwrap().collect(); functions::build_package_with_missing_deps(&missing_deps.as_slice());