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[])
296296 }
297297 std::string rpcPass;
298298 if (gArgs .GetBoolArg (" -stdinrpcpass" , false )) {
299- if (!std::getline (std::cin,rpcPass))
299+ if (!std::getline (std::cin, rpcPass)) {
300300 throw std::runtime_error (" -stdinrpcpass specified but failed to read from standard input" );
301+ }
301302 gArgs .ForceSetArg (" -rpcpassword" , rpcPass);
302303 }
303304 std::vector<std::string> args = std::vector<std::string>(&argv[1 ], &argv[argc]);
304305 if (gArgs .GetBoolArg (" -stdin" , false )) {
305306 // Read one arg per line from stdin and append
306307 std::string line;
307- while (std::getline (std::cin,line))
308+ while (std::getline (std::cin, line)) {
308309 args.push_back (line);
310+ }
309311 }
310- if (args.size () < 1 )
312+ if (args.size () < 1 ) {
311313 throw std::runtime_error (" too few parameters (need at least command)" );
314+ }
312315 std::string strMethod = args[0 ];
313316 args.erase (args.begin ()); // Remove trailing method name from arguments vector
314317
You can’t perform that action at this time.
0 commit comments