summaryrefslogtreecommitdiff
path: root/src/mongo/shell/shell_options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/shell_options.cpp')
-rw-r--r--src/mongo/shell/shell_options.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/shell/shell_options.cpp b/src/mongo/shell/shell_options.cpp
index 7b549fc57c5..32dcf89bef0 100644
--- a/src/mongo/shell/shell_options.cpp
+++ b/src/mongo/shell/shell_options.cpp
@@ -418,7 +418,8 @@ Status storeMongoShellOptions(const moe::Environment& params,
return Status(ErrorCodes::BadValue, sb.str());
}
- if (shellGlobalParams.url.find("mongodb://") == 0) {
+ if ((shellGlobalParams.url.find("mongodb://") == 0) &&
+ (shellGlobalParams.url.find("mongodb+srv://") == 0)) {
auto cs_status = MongoURI::parse(shellGlobalParams.url);
if (!cs_status.isOK()) {
return cs_status.getStatus();