summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2015-10-12 18:09:29 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2015-10-12 18:09:29 -0400
commitb8b056d939fceb8af5d45a5c5b9fdfd7449abbfe (patch)
treeed328d6da39ea1ea37787bec71cfc8a61b688f4a /src
parent01dead3f2c56292f08faf5461e60e79f5ac3ba3a (diff)
downloadmongo-b8b056d939fceb8af5d45a5c5b9fdfd7449abbfe.tar.gz
Revert "SERVER-18607 Mongo shell should report whether connected MongoDB is enterprise"
This reverts commit 0da3d37f6c8ada55e523b7176378ca047a0fa985.
Diffstat (limited to 'src')
-rw-r--r--src/mongo/shell/utils.js23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js
index 227f5e509b5..5adfe128acf 100644
--- a/src/mongo/shell/utils.js
+++ b/src/mongo/shell/utils.js
@@ -284,21 +284,6 @@ jsTest.isMongos = function(conn) {
defaultPrompt = function() {
var status = db.getMongo().authStatus;
- var prefix = db.getMongo().promptPrefix;
-
- if (typeof prefix == 'undefined') {
- prefix = "";
- var buildInfo = db.runCommand({buildInfo: 1});
- try {
- if (buildInfo.modules.indexOf("enterprise") > -1) {
- prefix = "MongoDB Enterprise "
- }
- } catch (e) {
- // Don't do anything here. Just throw the error away.
- }
- db.getMongo().promptPrefix = prefix;
- }
-
try {
// try to use repl set prompt -- no status or auth detected yet
if (!status || !status.authRequired) {
@@ -306,7 +291,7 @@ defaultPrompt = function() {
var prompt = replSetMemberStatePrompt();
// set our status that it was good
db.getMongo().authStatus = {replSetGetStatus:true, isMaster: true};
- return prefix + prompt;
+ return prompt;
} catch (e) {
// don't have permission to run that, or requires auth
//print(e);
@@ -322,7 +307,7 @@ defaultPrompt = function() {
// set our status that it was good
status.replSetGetStatus = true;
db.getMongo().authStatus = status;
- return prefix + prompt;
+ return prompt;
} catch (e) {
// don't have permission to run that, or requires auth
//print(e);
@@ -337,7 +322,7 @@ defaultPrompt = function() {
var prompt = isMasterStatePrompt();
status.isMaster = true;
db.getMongo().authStatus = status;
- return prefix + prompt;
+ return prompt;
} catch (e) {
status.authRequired = true;
status.isMaster = false;
@@ -350,7 +335,7 @@ defaultPrompt = function() {
}
db.getMongo().authStatus = status;
- return prefix + "> ";
+ return "> ";
}
replSetMemberStatePrompt = function() {