diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-05-31 14:44:54 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-05-31 14:44:54 -0500 |
commit | 503d2693fdd655b4a929bf6d1ca1ce07644e5041 (patch) | |
tree | 1f3c979357656f5c154acef69fb9d8fee7638fef /src/simplewallet/simplewallet.cpp | |
parent | Merge pull request #3635 (diff) | |
parent | wallet cli/rpc: terminate execution with code 0 when --help or --version is g... (diff) | |
download | monero-503d2693fdd655b4a929bf6d1ca1ce07644e5041.tar.xz |
Merge pull request #3640
f36132a wallet cli/rpc: terminate execution with code 0 when --help or --version is given (stoffu)
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a45d444f1..397614328 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -7524,7 +7524,9 @@ int main(int argc, char* argv[]) po::positional_options_description positional_options; positional_options.add(arg_command.name, -1); - 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-wallet-cli [--wallet-file=<file>|--generate-new-wallet=<file>] [<COMMAND>]", sw::tr("This is the command line monero wallet. It needs to connect to a monero\ndaemon to work correctly.\nWARNING: Do not reuse your Monero keys on an another fork, UNLESS this fork has key reuse mitigations built in. Doing so will harm your privacy."), @@ -7539,6 +7541,11 @@ int main(int argc, char* argv[]) return 1; } + if (should_terminate) + { + return 0; + } + cryptonote::simple_wallet w; const bool r = w.init(*vm); CHECK_AND_ASSERT_MES(r, 1, sw::tr("Failed to initialize wallet")); |