diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -539,6 +539,9 @@ throw std::runtime_error("-stdinrpcpass specified but failed " "to read from standard input"); } + if (StdinTerminal()) { + fputc('\n', stdout); + } gArgs.ForceSetArg("-rpcpassword", rpcPass); } std::vector args = @@ -560,6 +563,9 @@ throw std::runtime_error("-stdinwalletpassphrase specified but " "failed to read from standard input"); } + if (StdinTerminal()) { + fputc('\n', stdout); + } args.insert(args.begin() + 1, walletPass); } if (gArgs.GetBoolArg("-stdin", false)) { @@ -568,6 +574,9 @@ while (std::getline(std::cin, line)) { args.push_back(line); } + if (StdinTerminal()) { + fputc('\n', stdout); + } } std::unique_ptr rh; std::string method;