Allow gcl help to be run from anywhere

BUG=none
TEST=manual; gcl_unittests.py

Review URL: http://codereview.chromium.org/2857007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@50133 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
estade@chromium.org 15 years ago
parent 5be07f1364
commit c68f9cbc20

@ -1293,6 +1293,13 @@ def CMDhelp(args):
def main(argv):
if not argv:
argv = ['help']
command = Command(argv[0])
# Help can be run from anywhere.
if command == CMDhelp:
return command(argv[1:])
try:
GetRepositoryRoot()
except gclient_utils.Error:
@ -1308,9 +1315,6 @@ def main(argv):
if not os.path.exists(GetCacheDir()):
os.mkdir(GetCacheDir())
if not argv:
argv = ['help']
command = Command(argv[0])
if command:
return command(argv[1:])
# Unknown command, try to pass that to svn

Loading…
Cancel
Save