File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -296,19 +296,22 @@ int CommandLineRPC(int argc, char *argv[])
296
296
}
297
297
std::string rpcPass;
298
298
if (gArgs .GetBoolArg (" -stdinrpcpass" , false )) {
299
- if (!std::getline (std::cin,rpcPass))
299
+ if (!std::getline (std::cin, rpcPass)) {
300
300
throw std::runtime_error (" -stdinrpcpass specified but failed to read from standard input" );
301
+ }
301
302
gArgs .ForceSetArg (" -rpcpassword" , rpcPass);
302
303
}
303
304
std::vector<std::string> args = std::vector<std::string>(&argv[1 ], &argv[argc]);
304
305
if (gArgs .GetBoolArg (" -stdin" , false )) {
305
306
// Read one arg per line from stdin and append
306
307
std::string line;
307
- while (std::getline (std::cin,line))
308
+ while (std::getline (std::cin, line)) {
308
309
args.push_back (line);
310
+ }
309
311
}
310
- if (args.size () < 1 )
312
+ if (args.size () < 1 ) {
311
313
throw std::runtime_error (" too few parameters (need at least command)" );
314
+ }
312
315
std::string strMethod = args[0 ];
313
316
args.erase (args.begin ()); // Remove trailing method name from arguments vector
314
317
You can’t perform that action at this time.
0 commit comments