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)