1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Give precedence to user supplied --roles-path option (#27524)

This commit is contained in:
Chris Houseknecht 2017-07-31 18:46:49 -04:00 committed by GitHub
parent 16d23e96c5
commit e2651d4bac

View file

@ -333,9 +333,9 @@ class CLI(with_metaclass(ABCMeta, object)):
def unfrack_paths(option, opt, value, parser):
paths = getattr(parser.values, option.dest)
if isinstance(value, string_types):
paths.extend([unfrackpath(x) for x in value.split(os.pathsep)])
paths[:0] = [unfrackpath(x) for x in value.split(os.pathsep)]
elif isinstance(value, list):
paths.extend([unfrackpath(x) for x in value])
paths[:0] = [unfrackpath(x) for x in value]
else:
pass # FIXME: should we raise options error?
setattr(parser.values, option.dest, paths)