mongo return codes

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

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

              Created:
              Updated:
              Resolved: