summaryrefslogtreecommitdiff
path: root/src/mongo/shell/shell_options_init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/shell_options_init.cpp')
-rw-r--r--src/mongo/shell/shell_options_init.cpp51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/mongo/shell/shell_options_init.cpp b/src/mongo/shell/shell_options_init.cpp
index a19268e9f1a..ff6c0792ca5 100644
--- a/src/mongo/shell/shell_options_init.cpp
+++ b/src/mongo/shell/shell_options_init.cpp
@@ -35,34 +35,33 @@
#include "mongo/util/quick_exit.h"
namespace mongo {
- MONGO_GENERAL_STARTUP_OPTIONS_REGISTER(MongoShellOptions)(InitializerContext* context) {
- return addMongoShellOptions(&moe::startupOptions);
- }
-
- MONGO_STARTUP_OPTIONS_VALIDATE(MongoShellOptions)(InitializerContext* context) {
- if (!handlePreValidationMongoShellOptions(moe::startupOptionsParsed, context->args())) {
- quickExit(EXIT_SUCCESS);
- }
- Status ret = moe::startupOptionsParsed.validate();
- if (!ret.isOK()) {
- return ret;
- }
- ret = validateMongoShellOptions(moe::startupOptionsParsed);
- if (!ret.isOK()) {
- return ret;
- }
+MONGO_GENERAL_STARTUP_OPTIONS_REGISTER(MongoShellOptions)(InitializerContext* context) {
+ return addMongoShellOptions(&moe::startupOptions);
+}
- return Status::OK();
+MONGO_STARTUP_OPTIONS_VALIDATE(MongoShellOptions)(InitializerContext* context) {
+ if (!handlePreValidationMongoShellOptions(moe::startupOptionsParsed, context->args())) {
+ quickExit(EXIT_SUCCESS);
+ }
+ Status ret = moe::startupOptionsParsed.validate();
+ if (!ret.isOK()) {
+ return ret;
}
+ ret = validateMongoShellOptions(moe::startupOptionsParsed);
+ if (!ret.isOK()) {
+ return ret;
+ }
+
+ return Status::OK();
+}
- MONGO_STARTUP_OPTIONS_STORE(MongoShellOptions)(InitializerContext* context) {
- Status ret = storeMongoShellOptions(moe::startupOptionsParsed, context->args());
- if (!ret.isOK()) {
- std::cerr << ret.toString() << std::endl;
- std::cerr << "try '" << context->args()[0] << " --help' for more information"
- << std::endl;
- quickExit(EXIT_BADOPTIONS);
- }
- return Status::OK();
+MONGO_STARTUP_OPTIONS_STORE(MongoShellOptions)(InitializerContext* context) {
+ Status ret = storeMongoShellOptions(moe::startupOptionsParsed, context->args());
+ if (!ret.isOK()) {
+ std::cerr << ret.toString() << std::endl;
+ std::cerr << "try '" << context->args()[0] << " --help' for more information" << std::endl;
+ quickExit(EXIT_BADOPTIONS);
}
+ return Status::OK();
+}
}