Skip to content

Commit

Permalink
Merge #626
Browse files Browse the repository at this point in the history
626: Fix error message  in case of version-mismatch r=Urhengulas a=bobmcwhirter

Make the error message more meaningful. 

Currently it tells you probe-run supports defmt X while the firmware supports defmt Y, which is reasonable. But the substitution then tells you to install a version of probe-run that supports X (the version you're already using), which is contradictory, since Y (firmware supported version) is the real version you need to install for.

Co-authored-by: Bob McWhirter <bmcwhirt@redhat.com>
  • Loading branch information
bors[bot] and bobmcwhirter authored Nov 14, 2021
2 parents 124a6f6 + 4874895 commit 8984355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decoder/src/elf2table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fn check_version(version: &str) -> Result<(), String> {
if version != DEFMT_VERSION {
let msg = format!(
"defmt wire format version mismatch: firmware is using {}, `probe-run` supports {}\nsuggestion: `cargo install` a different version of `probe-run` that supports defmt {}",
version, DEFMT_VERSION, DEFMT_VERSION
version, DEFMT_VERSION, version
);

return Err(msg);
Expand Down

0 comments on commit 8984355

Please sign in to comment.