diff options
author | Zituo Jin <zituo.jin@mongodb.com> | 2021-09-22 15:03:23 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-09-22 16:09:32 +0000 |
commit | 2861a64889384880a2f25c93fa3e7ced80805b0d (patch) | |
tree | 85746683d7534f50629509cf14076cc9295a7c3b | |
parent | 854f433c3d0db22e64e41fdfd5cd6a4458cb840e (diff) | |
download | mongo-2861a64889384880a2f25c93fa3e7ced80805b0d.tar.gz |
SERVER-59883 suppress deprecation message with quiet flag
-rw-r--r-- | src/mongo/shell/mongo_main.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/shell/mongo_main.cpp b/src/mongo/shell/mongo_main.cpp index 811f896535c..c48fb46c742 100644 --- a/src/mongo/shell/mongo_main.cpp +++ b/src/mongo/shell/mongo_main.cpp @@ -944,16 +944,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 |