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-
This commit is contained in:
Hodlinator
2024-11-20 22:55:23 +01:00
parent e8a2054edc
commit 6ff9662760
6 changed files with 12 additions and 12 deletions

View File

@@ -145,10 +145,10 @@ static int AppInitRPC(int argc, char* argv[])
tfm::format(std::cerr, "Error parsing command line arguments: %s\n", error);
return EXIT_FAILURE;
}
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
if (argc < 2 || HelpRequested(gArgs) || gArgs.GetBoolArg("-version", false)) {
std::string strUsage = CLIENT_NAME " RPC client version " + FormatFullVersion() + "\n";
if (gArgs.IsArgSet("-version")) {
if (gArgs.GetBoolArg("-version", false)) {
strUsage += FormatParagraph(LicenseInfo());
} else {
strUsage += "\n"