Return a meaningful error message when no arg is given to gclient recurse.
It's better than throwing an exception.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3779010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@62921 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient.py b/gclient.py
index 6b25cbe..94bb98a 100644
--- a/gclient.py
+++ b/gclient.py
@@ -878,6 +878,9 @@
parser.add_option('-s', '--scm', action='append', default=[],
help='choose scm types to operate upon')
options, args = parser.parse_args(args)
+ if not args:
+ print >> sys.stderr, 'Need to supply a command!'
+ return 1
root_and_entries = gclient_utils.GetGClientRootAndEntries()
if not root_and_entries:
print >> sys.stderr, (