Skip to content

Commit d1688c9

Browse files
committed
add newline after -stdin*
1 parent 110e821 commit d1688c9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bitcoin-cli.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ static int CommandLineRPC(int argc, char *argv[])
422422
if (!std::getline(std::cin, rpcPass)) {
423423
throw std::runtime_error("-stdinrpcpass specified but failed to read from standard input");
424424
}
425+
fputc('\n', stdout);
425426
gArgs.ForceSetArg("-rpcpassword", rpcPass);
426427
}
427428
std::vector<std::string> args = std::vector<std::string>(&argv[1], &argv[argc]);
@@ -438,6 +439,7 @@ static int CommandLineRPC(int argc, char *argv[])
438439
if (!std::getline(std::cin, walletPass)) {
439440
throw std::runtime_error("-stdinwalletpassphrase specified but failed to read from standard input");
440441
}
442+
fputc('\n', stdout);
441443
args.insert(args.begin() + 1, walletPass);
442444
}
443445
if (gArgs.GetBoolArg("-stdin", false)) {
@@ -446,6 +448,7 @@ static int CommandLineRPC(int argc, char *argv[])
446448
while (std::getline(std::cin, line)) {
447449
args.push_back(line);
448450
}
451+
fputc('\n', stdout);
449452
}
450453
std::unique_ptr<BaseRequestHandler> rh;
451454
std::string method;

0 commit comments

Comments
 (0)