-
Type: Task
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Shell API
-
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.