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.
This commit is contained in:
steviez 2022-05-17 15:46:31 -06:00 committed by GitHub
parent 0820065c98
commit 3d8e5e91ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)
})