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

mongo return codes

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      We are scripting deloy scripts using .js files and want to have them automatically run at deploy time. But we need a proper return code:

      al01 /home/kgorman$ cat test.js | mongo
      MongoDB shell version: 1.5.2-pre-
      url: test
      connecting to: test
      type "help" for help
      > use content
      switched to db content
      > fdkjfkdjfkdb.bookStyles.ensureIndex(

      {"styleId":1,"sizeId":1,"version":1}

      )
      Mon May 24 16:32:33 JS Error: ReferenceError: fdkjfkdjfkdb is not defined (shell):0
      >
      > bye
      al01 /home/kgorman$ echo $?
      0

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            kgorman Kenny Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: