diff options
author | Hodlinator <172445034+hodlinator@users.noreply.github.com> | 2024-11-20 22:55:23 +0100 |
---|---|---|
committer | Hodlinator <172445034+hodlinator@users.noreply.github.com> | 2024-11-20 22:55:23 +0100 |
commit | 6ff9662760099c405cf13153dd1de22900045f5e (patch) | |
tree | aa2ab6ec16f93e8f02b568d26fe02caa2b649913 /src/bitcoin-wallet.cpp | |
parent | e8a2054edc814b2c4661b96a3dce91da9be68fa4 (diff) |
scripted-diff: Avoid printing version information for -noversion
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended 's/\b(gArgs|args)\.IsArgSet\("-version"\)/\1.GetBoolArg("-version", false)/g' $(git grep -l '-version')
-END VERIFY SCRIPT-
Diffstat (limited to 'src/bitcoin-wallet.cpp')
-rw-r--r-- | src/bitcoin-wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bitcoin-wallet.cpp b/src/bitcoin-wallet.cpp index be31620945..85910e56a7 100644 --- a/src/bitcoin-wallet.cpp +++ b/src/bitcoin-wallet.cpp @@ -60,10 +60,10 @@ static std::optional<int> WalletAppInit(ArgsManager& args, int argc, char* argv[ return EXIT_FAILURE; } const bool missing_args{argc < 2}; - if (missing_args || HelpRequested(args) || args.IsArgSet("-version")) { + if (missing_args || HelpRequested(args) || args.GetBoolArg("-version", false)) { std::string strUsage = strprintf("%s bitcoin-wallet utility version", CLIENT_NAME) + " " + FormatFullVersion() + "\n"; - if (args.IsArgSet("-version")) { + if (args.GetBoolArg("-version", false)) { strUsage += FormatParagraph(LicenseInfo()); } else { strUsage += "\n" |