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

[PR #8514/df7fe19b backport][stable-8] pacman: do not fail if there is nothing to do (#8522)

pacman: do not fail if there is nothing to do (#8514)

Do not fail if there is nothing to do.

(cherry picked from commit df7fe19bbe)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2024-06-17 07:19:48 +02:00 committed by GitHub
parent 68fb96480c
commit 444fbe8710
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "paman - do not fail if an empty list of packages has been provided and there is nothing to do (https://github.com/ansible-collections/community.general/pull/8514)."

View file

@ -367,8 +367,9 @@ class Pacman(object):
self.install_packages(pkgs) self.install_packages(pkgs)
self.success() self.success()
# This shouldn't happen... # This happens if an empty list has been provided for name
self.fail("This is a bug") self.add_exit_infos(msg='Nothing to do')
self.success()
def install_packages(self, pkgs): def install_packages(self, pkgs):
pkgs_to_install = [] pkgs_to_install = []