From 16e05ab5f3a680b0cbfd36b616cc73f26b5b3d89 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 7 Jan 2023 10:52:32 +0100 Subject: [PATCH] [PR #5751/2670215c backport][stable-6] Fix gem.py, hang on uninstall specific gem version (#5780) Fix gem.py, hang on uninstall specific gem version (#5751) * Update gem.py move 'cmd.append('--executable')' to all uninstalls rather than only all versions * Create 5751-gem-fix-uninstall-hang * Rename 5751-gem-fix-uninstall-hang to 5751-gem-fix-uninstall-hang.yml (cherry picked from commit 2670215c8ad6b18aac2220e1261818ed7f5f45cb) Co-authored-by: rietvelde <99407273+rietvelde@users.noreply.github.com> --- changelogs/fragments/5751-gem-fix-uninstall-hang.yml | 2 ++ plugins/modules/gem.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/5751-gem-fix-uninstall-hang.yml diff --git a/changelogs/fragments/5751-gem-fix-uninstall-hang.yml b/changelogs/fragments/5751-gem-fix-uninstall-hang.yml new file mode 100644 index 0000000000..3fdd0056de --- /dev/null +++ b/changelogs/fragments/5751-gem-fix-uninstall-hang.yml @@ -0,0 +1,2 @@ +bugfixes: + - gem - fix hang due to interactive prompt for confirmation on specific version uninstall (https://github.com/ansible-collections/community.general/pull/5751). diff --git a/plugins/modules/gem.py b/plugins/modules/gem.py index 8d7f7dade0..21e9efea58 100644 --- a/plugins/modules/gem.py +++ b/plugins/modules/gem.py @@ -234,7 +234,7 @@ def uninstall(module): cmd.extend(['--version', module.params['version']]) else: cmd.append('--all') - cmd.append('--executable') + cmd.append('--executable') cmd.append(module.params['name']) module.run_command(cmd, environ_update=environ, check_rc=True)