diff options
author | Alexander Neben <alexander.neben@mongodb.com> | 2022-08-08 19:02:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-08 19:31:12 +0000 |
commit | 152fde419e0d31a80f1211738f4b264892c85797 (patch) | |
tree | 31d513a4a6857f79e81f0d2e1a9bdd44af84d449 /src/mongo/shell/servers.js | |
parent | 2ac2df5c9e1bd3ed28245320b584121ada0ab781 (diff) | |
download | mongo-152fde419e0d31a80f1211738f4b264892c85797.tar.gz |
SERVER-68119 Standardized mongo[/d/s/q] lookup
Diffstat (limited to 'src/mongo/shell/servers.js')
-rw-r--r-- | src/mongo/shell/servers.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js index 769586308fe..d2f88ff689d 100644 --- a/src/mongo/shell/servers.js +++ b/src/mongo/shell/servers.js @@ -77,10 +77,18 @@ MongoRunner = function() {}; MongoRunner.dataDir = "/data/db"; MongoRunner.dataPath = "/data/db/"; -MongoRunner.mongodPath = "mongod"; -MongoRunner.mongosPath = "mongos"; -MongoRunner.mongoqPath = "mongoqd"; -MongoRunner.mongoShellPath = "mongo"; +var installDir = _getEnv("INSTALL_DIR"); +if (installDir) { + MongoRunner.mongodPath = installDir + "/mongod"; + MongoRunner.mongosPath = installDir + "/mongos"; + MongoRunner.mongoqPath = installDir + "/mongoqd"; + MongoRunner.mongoShellPath = installDir + "/mongo"; +} else { + MongoRunner.mongodPath = "mongod"; + MongoRunner.mongosPath = "mongos"; + MongoRunner.mongoqPath = "mongoqd"; + MongoRunner.mongoShellPath = "mongo"; +} MongoRunner.VersionSub = function(pattern, version) { this.pattern = pattern; |