aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler/command_line_interface.cc
diff options
context:
space:
mode:
authorGravatar Joshua Haberman <jhaberman@gmail.com>2017-03-15 14:45:03 -0700
committerGravatar GitHub <noreply@github.com>2017-03-15 14:45:03 -0700
commit4842363ee6db57b2edf056708a5688424d1b7abf (patch)
tree9e6e759c1821b34f1773e475c087775f623ca8b5 /src/google/protobuf/compiler/command_line_interface.cc
parente77a09e1e91d52f0fb8806a8da687d8426ba3bcc (diff)
parent769b693564aaf8625905e5488e425d27ea123949 (diff)
Merge pull request #2023 from odeke-em/fix-print-help-to-stdout
compiler/cli: PrintHelpText prints to stdout instead of stderr
Diffstat (limited to 'src/google/protobuf/compiler/command_line_interface.cc')
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index 621d98c5..f516477b 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -1452,7 +1452,7 @@ CommandLineInterface::InterpretArgument(const string& name,
void CommandLineInterface::PrintHelpText() {
// Sorry for indentation here; line wrapping would be uglier.
- std::cerr <<
+ std::cout <<
"Usage: " << executable_name_ << " [OPTION] PROTO_FILES\n"
"Parse PROTO_FILES and generate output based on the options given:\n"
" -IPATH, --proto_path=PATH Specify the directory in which to search for\n"
@@ -1499,7 +1499,7 @@ void CommandLineInterface::PrintHelpText() {
" occupied fields numbers.\n"
<< std::endl;
if (!plugin_prefix_.empty()) {
- std::cerr <<
+ std::cout <<
" --plugin=EXECUTABLE Specifies a plugin executable to use.\n"
" Normally, protoc searches the PATH for\n"
" plugins, but you may specify additional\n"
@@ -1515,7 +1515,7 @@ void CommandLineInterface::PrintHelpText() {
// FIXME(kenton): If the text is long enough it will wrap, which is ugly,
// but fixing this nicely (e.g. splitting on spaces) is probably more
// trouble than it's worth.
- std::cerr << " " << iter->first << "=OUT_DIR "
+ std::cout << " " << iter->first << "=OUT_DIR "
<< string(19 - iter->first.size(), ' ') // Spaces for alignment.
<< iter->second.help_text << std::endl;
}