fix: improve build error message when flatc is not installed (#85)
* fix: improve build error message when flatc is not installed * Apply suggestions from code review Co-authored-by: Jake Goulding <jake.goulding@integer32.com> * Make it more canonical rust Co-authored-by: Jake Goulding <jake.goulding@integer32.com>pull/24376/head
parent
c98c84c101
commit
f5d7e70db9
9
build.rs
9
build.rs
|
@ -18,9 +18,12 @@ fn main() -> Result<()> {
|
|||
.arg("-o")
|
||||
.arg(&out_dir)
|
||||
.arg("proto/delorean/wal.fbs")
|
||||
.status()?;
|
||||
if !status.success() {
|
||||
panic!("`flatc` failed to compile the .fbs to Rust");
|
||||
.status();
|
||||
|
||||
match status {
|
||||
Ok(status) if !status.success() => panic!("`flatc` failed to compile the .fbs to Rust"),
|
||||
Ok(_status) => {} // Successfully compiled
|
||||
Err(err) => panic!("Could not execute `flatc`: {}", err),
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue