mirror of
https://github.com/edu4rdshl/blackarch-devtools.git
synced 2026-07-17 23:24:47 +00:00
Remove unneeded status check.
Since that we are using a .expect() method in the Command::New action, the next check is unneeded and undesirable because it just check the status of the command inside the chroot environment nad as result package executables return a non-success status when not arguments are given (as in our case).
This commit is contained in:
parent
9ffad185df
commit
7fc133fd5a
1 changed files with 11 additions and 11 deletions
|
|
@ -350,22 +350,22 @@ pub fn test_package(package: &str, executable: &str) {
|
|||
&package
|
||||
)
|
||||
.unwrap();
|
||||
let execute_package = Command::new("sudo")
|
||||
Command::new("sudo")
|
||||
.args(&[&devtools_nspawn, &chroot_blackarch, executable])
|
||||
.status()
|
||||
.expect(
|
||||
"Failed to execute the {} binary in the chroot environment, check the binary name.",
|
||||
);
|
||||
if execute_package.success() {
|
||||
writeln!(
|
||||
coloring("green"),
|
||||
"Binary {} sucessfully executed!",
|
||||
executable
|
||||
)
|
||||
.unwrap();
|
||||
} else {
|
||||
writeln!(coloring("red"), "An error as ocurred while trying to execute the binary {}, are you sure that it's the binary name?", &executable).unwrap();
|
||||
}
|
||||
// if execute_package.success() {
|
||||
// writeln!(
|
||||
// coloring("green"),
|
||||
// "Binary {} sucessfully executed!",
|
||||
// executable
|
||||
// )
|
||||
// .unwrap();
|
||||
// } else {
|
||||
// writeln!(coloring("red"), "An error as ocurred while trying to execute the binary {}, are you sure that it's the binary name?", &executable).unwrap();
|
||||
// }
|
||||
} else {
|
||||
writeln!(
|
||||
coloring("red"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue