Skip to content

Commit 6ca73ab

Browse files
committed
Assert that the KERNEL executable exists
1 parent 1affb83 commit 6ca73ab

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- Assert that the passed `KERNEL` executable exists for better error messages
2+
13
# 0.5.3
24

35
- Mention minimal required bootimage version in error message when `KERNEL` environment variable is not set.

build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ fn main() {
2727
}
2828
});
2929

30+
// check that the kernel file exists
31+
assert!(
32+
kernel.exists(),
33+
format!("KERNEL does not exist: {}", kernel.display())
34+
);
35+
3036
let kernel_file_name = kernel
3137
.file_name()
3238
.expect("KERNEL has no valid file name")

0 commit comments

Comments
 (0)