diff options
| -rwxr-xr-x | main.py | 4 |
1 files changed, 1 insertions, 3 deletions
| @@ -185,9 +185,7 @@ class _Repo(object): | |||
| 185 | print('\nRun `repo help <command>` for command-specific details.') | 185 | print('\nRun `repo help <command>` for command-specific details.') |
| 186 | return 0 | 186 | return 0 |
| 187 | elif gopts.show_version: | 187 | elif gopts.show_version: |
| 188 | if name and name != 'help': | 188 | # Always allow global --version regardless of subcommand validity. |
| 189 | print('fatal: invalid usage of --version', file=sys.stderr) | ||
| 190 | return 1 | ||
| 191 | name = 'version' | 189 | name = 'version' |
| 192 | elif not name: | 190 | elif not name: |
| 193 | # No subcommand specified, so show the help/subcommand. | 191 | # No subcommand specified, so show the help/subcommand. |
