From 99807717888fbc8305d3485f4c6270e6204d9c7e Mon Sep 17 00:00:00 2001 From: steviez Date: Wed, 26 Jul 2023 13:25:56 -0500 Subject: [PATCH] ledger-tool: Workaround clap bug for encoding arg in genesis command (#32626) The --encoding flag only makes sense for the genesis command if the genesis accounts will be printed. Hence, the encoding flag used the Arg::requires() function on --accounts argument. However, in what appears to be a clap bug, this made the --accounts flag required even though it should not be. So, remove the .requires() dependency between these two arguments. --- 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 30b4c28b6..b6ac60bcc 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -1488,7 +1488,7 @@ fn main() { .requires("accounts") .help("Do not print account data when printing account contents."), ) - .arg(&accounts_data_encoding_arg.clone().requires("accounts")) + .arg(&accounts_data_encoding_arg) ) .subcommand( SubCommand::with_name("genesis-hash")