diff --git a/main.py b/main.py index 5c8ea85c..253f3112 100755 --- a/main.py +++ b/main.py @@ -185,9 +185,7 @@ class _Repo(object): print('\nRun `repo help ` for command-specific details.') return 0 elif gopts.show_version: - if name and name != 'help': - print('fatal: invalid usage of --version', file=sys.stderr) - return 1 + # Always allow global --version regardless of subcommand validity. name = 'version' elif not name: # No subcommand specified, so show the help/subcommand.