mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-06 06:04:24 -07:00
[PR #10532/abfe1e61 backport][stable-10] apk: fix empty/whitespace-only package name check (#10555)
apk: fix empty/whitespace-only package name check (#10532)
* Fix empty/whitespace-only package name check.
* Adjust test.
(cherry picked from commit abfe1e6180
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
ddbfbcb47e
commit
24789f86fa
3 changed files with 8 additions and 5 deletions
|
@ -351,7 +351,7 @@ def main():
|
|||
|
||||
p = module.params
|
||||
|
||||
if all(not name.strip() for name in p['name']):
|
||||
if p['name'] and any(not name.strip() for name in p['name']):
|
||||
module.fail_json(msg="Package name(s) cannot be empty or whitespace-only")
|
||||
|
||||
if p['no_cache']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue