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

Shell exits with successful return code upon failure

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.8
    • 2.6.5, 3.0.4
    • Shell
    • None
    • Fully Compatible
    • ALL
    • Hide

      → echo "if" | mongo --quiet ; echo $?
      2015-07-01T14:33:19.790-0500 E QUERY    SyntaxError: Unexpected end of input
      0
      

      Show
      → echo "if" | mongo --quiet ; echo $? 2015-07-01T14:33:19.790-0500 E QUERY SyntaxError: Unexpected end of input 0
    • Build 7 08/10/15, Build 8 08/31/15, Build 9 (09/18/15)

    Description

      Passing invalid Javascript to the shell prints an error message, but exits zero.

      When scripting tasks, I expect the shell to exit non-zero when there are errors.

      Attachments

        Activity

          People

            jonathan.reams@mongodb.com Jonathan Reams
            cbandy Chris Bandy
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: