Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1407

Provide ShellApi properties under distinct global name

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Shell API
    • Labels:
      None
    • 2

      Right now, we copy a number of ShellApi properties and methods over to the global object in mongosh (e.g. config, connect, quit, sleep etc.).

      This is usually fine, but can become problematic when accidentally overwriting these variables. (This slack thread mentions config = db.runCommand({storageGetConfig: 1}) as an example, which makes the config inaccessible.)

      It would probably be a good idea to also make this object available as e.g. mongosh or under a similar name in the global scope so that it remains accessible.

            Assignee:
            Unassigned Unassigned
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: