From 3d8e5e91eda10eaca7790049fef57ad3a6fad899 Mon Sep 17 00:00:00 2001 From: steviez Date: Tue, 17 May 2022 15:46:31 -0600 Subject: [PATCH] Fix ledger-tool from erroring with unspecified archive_format (#25298) value_t_or_exit()! will error if the user doesn't specify a value at runtime, use value_of() instead which will give either the default value or whatever the user specified. --- ledger-tool/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 33e6a9db43..fcc6714bba 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -2305,7 +2305,7 @@ fn main() { let snapshot_archive_format = { let archive_format_str = - value_t_or_exit!(matches, "snapshot_archive_format", String); + value_t_or_exit!(arg_matches, "snapshot_archive_format", String); ArchiveFormat::from_cli_arg(&archive_format_str).unwrap_or_else(|| { panic!("Archive format not recognized: {}", archive_format_str) })