Shell exits with successful return code upon failure

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.8
    • Affects Version/s: 2.6.5, 3.0.4
    • Component/s: 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)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Jonathan Reams
            Reporter:
            Chris Bandy
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: