You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 07:36:58 UTC

svn commit: r1131817 - /incubator/mesos/trunk/src/slave_main.cpp

Author: benh
Date: Sun Jun  5 05:36:58 2011
New Revision: 1131817

URL: http://svn.apache.org/viewvc?rev=1131817&view=rev
Log:
Print a better error message if --url is not given to nexus-slave.

Modified:
    incubator/mesos/trunk/src/slave_main.cpp

Modified: incubator/mesos/trunk/src/slave_main.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave_main.cpp?rev=1131817&r1=1131816&r2=1131817&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave_main.cpp (original)
+++ incubator/mesos/trunk/src/slave_main.cpp Sun Jun  5 05:36:58 2011
@@ -11,13 +11,13 @@ using namespace nexus::internal::slave;
 void usage(const char *programName)
 {
   cerr << "Usage: " << programName
-       << " [--url URL]"
+       << " --url MASTER_URL"
        << " [--cpus NUM]"
        << " [--mem NUM]"
        << " [--isolation TYPE]"
        << " [--quiet]" << endl
        << endl
-       << "URL (used for connecting to a master) may be one of:" << endl
+       << "MASTER_URL may be one of:" << endl
        << "  nexus://id@host:port" << endl
        << "  zoo://host1:port1,host2:port2,..." << endl
        << "  zoofile://file where file contains a host:port pair per line"
@@ -73,6 +73,11 @@ int main(int argc, char **argv)
     }
   }
 
+  if (url == "") {
+    cerr << "Master URL argument (--url) required." << endl;
+    exit(1);
+  }
+
   if (!quiet)
     google::SetStderrLogging(google::INFO);