SERVER-2837 -- be more friendly to piping in the shell

Don't print 'bye' on exit when --quiet is set.
This commit is contained in:
Tad Marshall
2011-11-28 00:16:36 -05:00
parent cabc4a262a
commit 18fb262f9e

View File

@@ -849,7 +849,8 @@ int _main( int argc, char* argv[] ) {
}
if ( ! linePtr || ( strlen( linePtr ) == 4 && strstr( linePtr , "exit" ) ) ) {
cout << "bye" << endl;
if ( ! mongo::cmdLine.quiet )
cout << "bye" << endl;
if ( line )
free( line );
break;