diff options
Diffstat (limited to 'src/mongo/shell/servers.js')
-rw-r--r-- | src/mongo/shell/servers.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js index 2bd37d0467f..679b42463c9 100644 --- a/src/mongo/shell/servers.js +++ b/src/mongo/shell/servers.js @@ -1079,6 +1079,11 @@ function appendSetParameterArgs(argArray) { // programName includes the version, e.g., mongod-3.2. // baseProgramName is the program name without any version information, e.g., mongod. let programName = argArray[0]; + const separator = _isWindows() ? '\\' : '/'; + if (programName.indexOf(separator) !== -1) { + let pathElements = programName.split(separator); + programName = pathElements[pathElements.length - 1]; + } let [baseProgramName, programVersion] = programName.split("-"); let programMajorMinorVersion = 0; |