summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorZituo Jin <zituo.jin@mongodb.com>2021-09-22 15:03:23 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-29 02:53:49 +0000
commitc93e59cbc8882eed24cfc4046e55c82561f75ee8 (patch)
tree87196b661eba39d16dcb673e865e5360cc993306 /src/mongo
parent2fe5ed35b58f3f879cdf4200133102a9ae18d9ca (diff)
downloadmongo-c93e59cbc8882eed24cfc4046e55c82561f75ee8.tar.gz
SERVER-59883 suppress deprecation message with quiet flag
(cherry picked from commit 2861a64889384880a2f25c93fa3e7ced80805b0d)
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/shell/mongo_main.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/shell/mongo_main.cpp b/src/mongo/shell/mongo_main.cpp
index b5522ce81b8..f4421730741 100644
--- a/src/mongo/shell/mongo_main.cpp
+++ b/src/mongo/shell/mongo_main.cpp
@@ -927,16 +927,16 @@ int mongo_main(int argc, char* argv[]) {
bool lastLineSuccessful = true;
if (shellGlobalParams.runShell) {
- std::cout << "================\n"
- "Warning: the \"mongo\" shell has been superseded by \"mongosh\",\n"
- "which delivers improved usability and compatibility."
- "The \"mongo\" shell has been deprecated and will be removed in\n"
- "an upcoming release.\n"
- "We recommend you begin using \"mongosh\".\n"
- "For installation instructions, see\n"
- "https://docs.mongodb.com/mongodb-shell/install/\n"
- "================"
- << std::endl;
+ if (!mongo::serverGlobalParams.quiet.load())
+ std::cout << "================\n"
+ "Warning: the \"mongo\" shell has been superseded by \"mongosh\",\n"
+ "which delivers improved usability and compatibility."
+ "The \"mongo\" shell has been deprecated and will be removed in\n"
+ "an upcoming release.\n"
+ "For installation instructions, see\n"
+ "https://docs.mongodb.com/mongodb-shell/install/\n"
+ "================"
+ << std::endl;
mongo::shell_utils::MongoProgramScope s;
// If they specify norc, assume it's not their first time