wallet cli/rpc: terminate execution with code 0 when --help or --version is given

This commit is contained in:
stoffu 2018-04-15 14:52:53 +09:00
parent 8fdf645397
commit f36132a837
No known key found for this signature in database
GPG key ID: 41DAB8343A9EC012
5 changed files with 36 additions and 10 deletions

View file

@ -174,7 +174,9 @@ int main(int argc, char* argv[])
command_line::add_arg(desc_params, arg_stagenet);
command_line::add_arg(desc_params, arg_create_address_file);
const auto vm = wallet_args::main(
boost::optional<po::variables_map> vm;
bool should_terminate = false;
std::tie(vm, should_terminate) = wallet_args::main(
argc, argv,
"monero-gen-multisig [(--testnet|--stagenet)] [--filename-base=<filename>] [--scheme=M/N] [--threshold=M] [--participants=N]",
genms::tr("This program generates a set of multisig wallets - use this simpler scheme only if all the participants trust each other"),
@ -185,6 +187,8 @@ int main(int argc, char* argv[])
);
if (!vm)
return 1;
if (should_terminate)
return 0;
bool testnet, stagenet;
uint32_t threshold = 0, total = 0;