-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: JavaScript
-
None
-
Minor Change
The (native) "version()" function we install for JavaScript prints the version string to stdout and also prints the Git hash if the version string includes a "+". The function then returns "undefined" (which is displayed as "null" in the shell).
This function would be more useful if it instead returned the version string and let the caller parse it and/or display it if desired.
MongoDB shell version: 2.1.2-pre- connecting to: test > var versionString = version(); // prints string instead of returning it version: 2.1.2-pre- > versionString > versionString == null true >
- is duplicated by
-
SERVER-7187 Add function to shell to get what version the shell is
-
- Closed
-