Skip to content

Commit

Permalink
dvc: fix --help
Browse files Browse the repository at this point in the history
Currently dvc prints "Unimplemented or unrecognized command: --help"
and returns error code when calling dvc --help.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
  • Loading branch information
efiop committed May 20, 2017
1 parent d03f312 commit 76d1477
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dvc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand All @@ -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)
Expand Down

0 comments on commit 76d1477

Please sign in to comment.