Skip to content

Commit 596770d

Browse files
committed
aml_tester: better error message when iasl is not installed
1 parent d9a4d3e commit 596770d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

aml_tester/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,11 @@ fn compile_asl_files(dir_path: &Path) -> std::io::Result<(u32, u32)> {
8686

8787
if !asl_files.peek().is_none() {
8888
// Test if `iasl` is installed, so we can give a good error if it's not
89-
if Command::new("iasl").arg("-v").status().unwrap().success().not() {
90-
panic!("`iasl` is not installed, but we want to compile some ASL files! Pass --no-compile, or install `iasl`");
89+
match Command::new("iasl").arg("-v").status() {
90+
Ok(exit_status) => if exit_status.success().not() {
91+
panic!("`iasl` exited with unsuccessfull status: {:?}", exit_status);
92+
},
93+
Err(_) => panic!("`iasl` is not installed, but we want to compile some ASL files! Pass --no-compile, or install `iasl`"),
9194
}
9295
}
9396

0 commit comments

Comments
 (0)