Remove extraneous newline from ldb stderr (#6897)

Summary:
**Summary**
Remove the extraneous newline when using ldb tool. For example, the subcommand list_column_families will print an empty line to stderr even if there are no errors.

**Test plan**
Passed make check; manually tested a few ldb subcommands.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6897

Reviewed By: pdillinger

Differential Revision: D21819352

Pulled By: gg814

fbshipit-source-id: 5a16a6431bb96684fe97647f4d3ac5bf0ec7fc90
main
zitan 5 years ago committed by Facebook GitHub Bot
parent 0c56fc4d66
commit 038e02d8d9
  1. 2
      tools/ldb_tool.cc

@ -124,7 +124,9 @@ int LDBCommandRunner::RunCommand(
cmdObj->Run();
LDBCommandExecuteResult ret = cmdObj->GetExecuteState();
if (!ret.ToString().empty()) {
fprintf(stderr, "%s\n", ret.ToString().c_str());
}
delete cmdObj;
return ret.IsFailed() ? 1 : 0;

Loading…
Cancel
Save