aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-05-31 14:44:54 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-05-31 14:44:54 -0500
commit503d2693fdd655b4a929bf6d1ca1ce07644e5041 (patch)
tree1f3c979357656f5c154acef69fb9d8fee7638fef /src/wallet/wallet_rpc_server.cpp
parentMerge pull request #3635 (diff)
parentwallet cli/rpc: terminate execution with code 0 when --help or --version is g... (diff)
downloadmonero-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/wallet/wallet_rpc_server.cpp')
-rw-r--r--src/wallet/wallet_rpc_server.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 3161286a7..dc1beef7b 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -2901,7 +2901,9 @@ int main(int argc, char** argv) {
command_line::add_arg(desc_params, arg_wallet_dir);
command_line::add_arg(desc_params, arg_prompt_for_password);
- 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-rpc [--wallet-file=<file>|--generate-from-json=<file>|--wallet-dir=<directory>] [--rpc-bind-port=<port>]",
tools::wallet_rpc_server::tr("This is the RPC monero wallet. It needs to connect to a monero\ndaemon to work correctly."),
@@ -2915,6 +2917,10 @@ int main(int argc, char** argv) {
{
return 1;
}
+ if (should_terminate)
+ {
+ return 0;
+ }
std::unique_ptr<tools::wallet2> wal;
try