mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user