mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
remove whitespace before trailing ; in shell helpers SERVER-3001
This was causing issues when someone typed "use some_db ;" into the shell
This commit is contained in:
parent
26c85ceb23
commit
ef373aa1de
@ -1051,7 +1051,7 @@ const StringData _jscode_raw_utils =
|
||||
"\n"
|
||||
"shellHelper = function( command , rest , shouldPrint ){\n"
|
||||
"command = command.trim();\n"
|
||||
"var args = rest.trim().replace(/;$/,\"\").split( \"\\s+\" );\n"
|
||||
"var args = rest.trim().replace(/\\s+;$/,\"\").split( \"\\s+\" );\n"
|
||||
"\n"
|
||||
"if ( ! shellHelper[command] )\n"
|
||||
"throw \"no command [\" + command + \"]\";\n"
|
||||
|
@ -1046,7 +1046,7 @@ shellAutocomplete.showPrivate = false; // toggle to show (useful when working on
|
||||
|
||||
shellHelper = function( command , rest , shouldPrint ){
|
||||
command = command.trim();
|
||||
var args = rest.trim().replace(/;$/,"").split( "\s+" );
|
||||
var args = rest.trim().replace(/\s+;$/,"").split( "\s+" );
|
||||
|
||||
if ( ! shellHelper[command] )
|
||||
throw "no command [" + command + "]";
|
||||
|
Loading…
Reference in New Issue
Block a user