cli - deprecated setting verbosity before sub command, cont'd (#77456)

Follow up on #75840
pull/77466/head
Martin Krizek 2 years ago committed by GitHub
parent f41636b9b8
commit cdf998fa79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -171,9 +171,7 @@ class GalaxyCLI(CLI):
# Inject role into sys.argv[1] as a backwards compatibility step
if args[1] not in ['-h', '--help', '--version'] and 'role' not in args and 'collection' not in args:
# TODO: Should we add a warning here and eventually deprecate the implicit role subcommand choice
# Remove this in Ansible 2.13 when we also remove -v as an option on the root parser for ansible-galaxy.
idx = 2 if args[1].startswith('-v') else 1
args.insert(idx, 'role')
args.insert(1, 'role')
self._implicit_role = True
# since argparse doesn't allow hidden subparsers, handle dead login arg from raw args after "role" normalization
if args[1:3] == ['role', 'login']:

Loading…
Cancel
Save