core: Handle empty extra vars in cli (#61831)
Fixes: #61497 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
a6ec6c3175
commit
a2e61f67d5
2 changed files with 4 additions and 0 deletions
2
changelogs/fragments/extra-vars.yml
Normal file
2
changelogs/fragments/extra-vars.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Handle empty extra vars in ansible cli (https://github.com/ansible/ansible/issues/61497).
|
|
@ -60,6 +60,8 @@ def parse_kv(args, check_raw=False):
|
|||
if args is not None:
|
||||
try:
|
||||
vargs = split_args(args)
|
||||
except IndexError as e:
|
||||
raise AnsibleParserError("Unable to parse argument string", orig_exc=e)
|
||||
except ValueError as ve:
|
||||
if 'no closing quotation' in str(ve).lower():
|
||||
raise AnsibleParserError("error parsing argument string, try quoting the entire line.", orig_exc=ve)
|
||||
|
|
Loading…
Reference in a new issue