You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/08/04 16:31:41 UTC
[3/3] mesos git commit: Mesos-slave --help should not return as
failed.
Mesos-slave --help should not return as failed.
Doing a simple \`mesos-agent --help\` should return with exit_status=0.
It's not the case since work_dir is considered as mandatory.
Review: https://reviews.apache.org/r/50570/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cc86e4bf
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cc86e4bf
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cc86e4bf
Branch: refs/heads/1.0.x
Commit: cc86e4bfd4eeffbd1e93ec78b92903319baf2d53
Parents: c2e6cc6
Author: Pierre Cheynier <me...@pierre-cheynier.net>
Authored: Thu Aug 4 09:26:57 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Thu Aug 4 09:30:53 2016 -0700
----------------------------------------------------------------------
src/slave/main.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/cc86e4bf/src/slave/main.cpp
----------------------------------------------------------------------
diff --git a/src/slave/main.cpp b/src/slave/main.cpp
index a4d971a..6fb5b28 100644
--- a/src/slave/main.cpp
+++ b/src/slave/main.cpp
@@ -182,6 +182,11 @@ int main(int argc, char** argv)
Try<flags::Warnings> load = flags.load("MESOS_", argc, argv);
+ if (flags.help) {
+ cout << flags.usage() << endl;
+ return EXIT_SUCCESS;
+ }
+
// TODO(marco): this pattern too should be abstracted away
// in FlagsBase; I have seen it at least 15 times.
if (load.isError()) {
@@ -189,11 +194,6 @@ int main(int argc, char** argv)
return EXIT_FAILURE;
}
- if (flags.help) {
- cout << flags.usage() << endl;
- return EXIT_SUCCESS;
- }
-
if (flags.version) {
cout << "mesos" << " " << MESOS_VERSION << endl;
return EXIT_SUCCESS;