summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@10gen.com>2019-06-18 16:08:28 -0400
committerBen Caimano <ben.caimano@10gen.com>2019-06-19 11:24:53 -0400
commit39fe80fe5385c8b472576f9059b6d1791fabe473 (patch)
tree9e96cd88e4233678018c695254ba1902b7691676 /src
parentcc38c15817512b67ddba9ee4fcf979d7ee197243 (diff)
downloadmongo-39fe80fe5385c8b472576f9059b6d1791fabe473.tar.gz
SERVER-41817 String ServerParameters should not be JSON.stringify'd
Diffstat (limited to 'src')
-rw-r--r--src/mongo/shell/servers.js21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index 38d72bf2816..4ebf51ec693 100644
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -1118,8 +1118,14 @@ var MongoRunner, _startMongod, startMongoProgram, runMongoProgram, startMongoPro
argArrayContains("logComponentVerbosity")) {
continue;
}
- const paramVal = params[paramName];
- const setParamStr = paramName + "=" + JSON.stringify(paramVal);
+ const paramVal = ((param) => {
+ if (typeof param === "object") {
+ return JSON.stringify(param);
+ }
+
+ return param;
+ })(params[paramName]);
+ const setParamStr = paramName + "=" + paramVal;
argArray.push(...['--setParameter', setParamStr]);
}
}
@@ -1214,8 +1220,15 @@ var MongoRunner, _startMongod, startMongoProgram, runMongoProgram, startMongoPro
argArrayContains("logComponentVerbosity")) {
continue;
}
- const paramVal = params[paramName];
- const setParamStr = paramName + "=" + JSON.stringify(paramVal);
+
+ const paramVal = ((param) => {
+ if (typeof param === "object") {
+ return JSON.stringify(param);
+ }
+
+ return param;
+ })(params[paramName]);
+ const setParamStr = paramName + "=" + paramVal;
argArray.push(...['--setParameter', setParamStr]);
}
}