summaryrefslogtreecommitdiff
path: root/src/mongo/shell/servers.js
diff options
context:
space:
mode:
authorAlexander Neben <alexander.neben@mongodb.com>2022-08-08 19:02:24 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-08 19:31:12 +0000
commit152fde419e0d31a80f1211738f4b264892c85797 (patch)
tree31d513a4a6857f79e81f0d2e1a9bdd44af84d449 /src/mongo/shell/servers.js
parent2ac2df5c9e1bd3ed28245320b584121ada0ab781 (diff)
downloadmongo-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.js16
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;