summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authordannenberg <dannenberg.matt@gmail.com>2011-06-15 14:51:52 -0400
committerdannenberg <dannenberg.matt@gmail.com>2011-06-15 16:27:20 -0400
commit2fdf334c6b9526e6997a7812c09371921867ddf1 (patch)
treea9ad731ec0b06e10ec62da9147ead1d17713ab9e /shell
parent1c180c6a60126e8468e71d7b36b29ee0d7b7bdb9 (diff)
downloadmongo-2fdf334c6b9526e6997a7812c09371921867ddf1.tar.gz
fixed custom prompt in spidermonkey
Diffstat (limited to 'shell')
-rw-r--r--shell/dbshell.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/dbshell.cpp b/shell/dbshell.cpp
index 0014b34f7ac..514e1e1b0a6 100644
--- a/shell/dbshell.cpp
+++ b/shell/dbshell.cpp
@@ -679,11 +679,11 @@ int _main(int argc, char* argv[]) {
// shellMainScope->localConnect;
//DBClientWithCommands *c = getConnection( JSContext *cx, JSObject *obj );
- if (scope->exec("prompt", "", false, false, false)) {
- prompt = scope->getString("prompt");
- } else {
+ prompt = scope->getString("prompt");
+
+ if (prompt == "undefined") {
prompt = sayReplSetMemberState()+"> ";
- }
+ }
char * line = shellReadline( prompt.c_str() );
if ( line ) {