Skip to content

Commit

Permalink
Fixes error string in hash-cache-tool (#2778)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo committed Aug 29, 2024
1 parent b0bcbc1 commit da2a319
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions accounts-db/accounts-hash-cache-tool/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,14 @@ fn main() {
.get_matches();

let subcommand = matches.subcommand();
let subcommand_str = subcommand.0;
let mut command_str = subcommand.0.to_string();
match subcommand {
(CMD_INSPECT, Some(subcommand_matches)) => cmd_inspect(&matches, subcommand_matches),
(CMD_SEARCH, Some(subcommand_matches)) => cmd_search(&matches, subcommand_matches),
(CMD_DIFF, Some(subcommand_matches)) => {
let diff_subcommand = subcommand_matches.subcommand();
command_str += " ";
command_str += diff_subcommand.0;
match diff_subcommand {
(CMD_DIFF_FILES, Some(diff_subcommand_matches)) => {
cmd_diff_files(&matches, diff_subcommand_matches)
Expand All @@ -215,7 +217,7 @@ fn main() {
_ => unreachable!(),
}
.unwrap_or_else(|err| {
eprintln!("Error: '{subcommand_str}' failed: {err}");
eprintln!("Error: '{command_str}' failed: {err}");
std::process::exit(1);
});
}
Expand Down

0 comments on commit da2a319

Please sign in to comment.