mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
apk: fix empty/whitespace-only package name check (#10532)
* Fix empty/whitespace-only package name check. * Adjust test.
This commit is contained in:
@@ -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']:
|
||||
|
||||
Reference in New Issue
Block a user