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

[PR #5822/fe520a6b backport][stable-6] Gem: Support force flag when uninstalling (#5884)

Gem: Support force flag when uninstalling (#5822)

* Gem: Support force flag when uninstalling

* Improve docs' syntax

* Add changelog fragment

(cherry picked from commit fe520a6b09)

Co-authored-by: Juan Vela <juan.vela.bcn@gmail.com>
This commit is contained in:
patchback[bot] 2023-01-24 20:06:16 +01:00 committed by GitHub
parent 54099d77ff
commit c7f7bd6050
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:
- gem - fix force parameter not being passed to gem command when uninstalling (https://github.com/ansible-collections/community.general/pull/5822).

View file

@ -105,7 +105,7 @@ options:
required: false
force:
description:
- Force gem to install, bypassing dependency checks.
- Force gem to (un-)install, bypassing dependency checks.
required: false
default: false
type: bool
@ -235,6 +235,8 @@ def uninstall(module):
else:
cmd.append('--all')
cmd.append('--executable')
if module.params['force']:
cmd.append('--force')
cmd.append(module.params['name'])
module.run_command(cmd, environ_update=environ, check_rc=True)