|
|
|
@ -171,9 +171,7 @@ class GalaxyCLI(CLI):
|
|
|
|
# Inject role into sys.argv[1] as a backwards compatibility step
|
|
|
|
# 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:
|
|
|
|
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
|
|
|
|
# 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.
|
|
|
|
args.insert(1, 'role')
|
|
|
|
idx = 2 if args[1].startswith('-v') else 1
|
|
|
|
|
|
|
|
args.insert(idx, 'role')
|
|
|
|
|
|
|
|
self._implicit_role = True
|
|
|
|
self._implicit_role = True
|
|
|
|
# since argparse doesn't allow hidden subparsers, handle dead login arg from raw args after "role" normalization
|
|
|
|
# since argparse doesn't allow hidden subparsers, handle dead login arg from raw args after "role" normalization
|
|
|
|
if args[1:3] == ['role', 'login']:
|
|
|
|
if args[1:3] == ['role', 'login']:
|
|
|
|
|