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:
parent
0820065c98
commit
3d8e5e91ed
|
@ -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)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue