mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
gem_module: Use --norc to avoid surprises
Run install and uninstall actions with `--norc`. This way ansible has more control over the way gems are installed.
This commit is contained in:
@@ -200,6 +200,7 @@ def uninstall(module):
|
||||
cmd = get_rubygems_path(module)
|
||||
environ = get_rubygems_environ(module)
|
||||
cmd.append('uninstall')
|
||||
cmd.append('--norc')
|
||||
if module.params['install_dir']:
|
||||
cmd.extend(['--install-dir', module.params['install_dir']])
|
||||
|
||||
@@ -228,6 +229,7 @@ def install(module):
|
||||
|
||||
cmd = get_rubygems_path(module)
|
||||
cmd.append('install')
|
||||
cmd.append('--norc')
|
||||
if module.params['version']:
|
||||
cmd.extend(['--version', module.params['version']])
|
||||
if module.params['repository']:
|
||||
|
||||
Reference in New Issue
Block a user