Merge pull request #22870 from thomasetter/master

do not write unnecessary (and incorrect) new lines in binary output for the grpc_cli
pull/22930/head
Yash Tibrewal 5 years ago committed by GitHub
commit fab7c2a7df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      test/cpp/util/grpc_cli.cc

@ -68,10 +68,10 @@ DEFINE_string(outfile, "", "Output file (default is stdout)");
static bool SimplePrint(const grpc::string& outfile,
const grpc::string& output) {
if (outfile.empty()) {
std::cout << output << std::endl;
std::cout << output << std::flush;
} else {
std::ofstream output_file(outfile, std::ios::app | std::ios::binary);
output_file << output << std::endl;
output_file << output << std::flush;
output_file.close();
}
return true;

Loading…
Cancel
Save