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

modules/xbps: fix error message (#4438)

The previous error message was not giving the full or even correct
information to the user.
This commit is contained in:
Cameron Nemo 2022-04-10 22:05:04 -07:00 committed by GitHub
parent 7e6a2453d0
commit d3adde4739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- xbps - fix error message that is reported when installing packages fails (https://github.com/ansible-collections/community.general/pull/4438).

View file

@ -230,7 +230,9 @@ def install_packages(module, xbps_path, state, packages):
module.params['upgrade_xbps'] = False module.params['upgrade_xbps'] = False
install_packages(module, xbps_path, state, packages) install_packages(module, xbps_path, state, packages)
elif rc != 0 and not (state == 'latest' and rc == 17): elif rc != 0 and not (state == 'latest' and rc == 17):
module.fail_json(msg="failed to install %s" % (package)) module.fail_json(msg="failed to install %s packages(s)"
% (len(toInstall)),
packages=toInstall)
module.exit_json(changed=True, msg="installed %s package(s)" module.exit_json(changed=True, msg="installed %s package(s)"
% (len(toInstall)), % (len(toInstall)),