From 2618fb8d15d01dca967856c92ebf3e4cc09699a2 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 21 Feb 2022 19:32:59 +0000 Subject: Output license info when binaries are passed -version Consolidate to outputting the licensing info when we pass -version to a binary, i.e bitcoind -version: ```bash itcoin Core version v22.99.0-fc1f355913f6-dirty Copyright (C) 2009-2022 The Bitcoin Core developers Please contribute if you find Bitcoin Core useful. Visit for further information about the software. The source code is available from . This is experimental software. Distributed under the MIT software license, see the accompanying file COPYING or ``` --- src/bitcoin-cli.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/bitcoin-cli.cpp') diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 874e38752a..5523fff3b2 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -133,7 +133,10 @@ static int AppInitRPC(int argc, char* argv[]) } if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n"; - if (!gArgs.IsArgSet("-version")) { + + if (gArgs.IsArgSet("-version")) { + strUsage += FormatParagraph(LicenseInfo()); + } else { strUsage += "\n" "Usage: bitcoin-cli [options] [params] Send command to " PACKAGE_NAME "\n" "or: bitcoin-cli [options] -named [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n" -- cgit v1.2.3