Skip to content

Commit

Permalink
Merge pull request #49 from rust-fuzz/error-msg
Browse files Browse the repository at this point in the history
Better error message when version of honggfuzz bin and lib do not match
  • Loading branch information
PaulGrandperrin committed Mar 3, 2021
2 parents 64e9bb6 + a6cb56d commit f322f75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ fn main() {
// check that "cargo hfuzz" command is at the same version as this file
let honggfuzz_build_version = env::var("CARGO_HONGGFUZZ_BUILD_VERSION").unwrap_or("unknown".to_string());
if VERSION != honggfuzz_build_version {
eprintln!("honggfuzz dependency ({}) and build command ({}) versions do not match",
eprintln!("The version of the honggfuzz library dependency ({0}) and the version of the `cargo-hfuzz` executable ({1}) do not match.\n\
If updating both by running `cargo update` and `cargo install honggfuzz` does not work, you can either:\n\
- change the dependency in `Cargo.toml` to `honggfuzz = \"={1}\"`\n\
- or run `cargo install honggfuzz --version {0}`",
VERSION, honggfuzz_build_version);
process::exit(1);
}
Expand Down

0 comments on commit f322f75

Please sign in to comment.