Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19048

shell types a help message even when --quiet flag is specified

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 4.1.2
    • Affects Version/s: 2.6.10
    • Component/s: Shell
    • None
    • Fully Compatible
    • ALL

      % mongo
      MongoDB shell version: 3.1.3
      connecting to: test
      > exit
      % mongo --quiet
      > exit
      % mongo --shell
      MongoDB shell version: 3.1.3
      connecting to: test
      type "help" for help
      > exit
      % mongo --quiet --shell
      type "help" for help
      > 
      

      The culprit seems to be this line (not even sure why it's there):
      https://github.com/mongodb/mongo/blob/449e0f2b47e32060433cb6f68d967ea53c8573d1/src/mongo/shell/dbshell.cpp#L688-L689

      Instead of

       if( shellGlobalParams.runShell )
      

      it should be

       if( shellGlobalParams.runShell && !mongo::serverGlobalParams.quiet )
      

            Assignee:
            asya.kamsky@mongodb.com Asya Kamsky
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: