dvc: fix --help

Currently dvc prints "Unimplemented or unrecognized command: --help"
and returns error code when calling dvc --help.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2017-05-21 02:44:12 +03:00
parent d03f3128c4
commit 76d1477e50
+4 -2
View File
@@ -38,7 +38,7 @@ def print_usage():
print('\n'.join(usage))
def main():
cmds = ['--version', 'init', 'run', 'sync', 'repro', 'data', 'remove', 'import', 'lock', 'cloud', \
cmds = ['--help', '--version', 'init', 'run', 'sync', 'repro', 'data', 'remove', 'import', 'lock', 'cloud', \
'cloud', 'cloud-run', 'cloud-instance-create', 'cloud-instance-remove', 'cloud-instance-describe', \
'test', 'test-aws', 'test-gcloud', 'test-cloud']
@@ -50,7 +50,9 @@ def main():
cmd = sys.argv[1]
if cmd == '--version':
if cmd == '--help':
print_usage()
elif cmd == '--version':
print('dvc version {}'.format(VERSION))
elif cmd == 'init':
Runtime.run(CmdInit, parse_config=False)