diff --git a/packaging/os/apt.py b/packaging/os/apt.py index fa0a86603e8..53027a464f0 100755 --- a/packaging/os/apt.py +++ b/packaging/os/apt.py @@ -582,7 +582,8 @@ def main(): if module.check_mode: module.fail_json(msg="python-apt must be installed to use check mode. If run normally this module can autoinstall it") try: - module.run_command('apt-get update && apt-get install python-apt -y -q --force-yes', use_unsafe_shell=True, check_rc=True) + module.run_command('apt-get update', check_rc=True) + module.run_command('apt-get install python-apt -y -q', check_rc=True) global apt, apt_pkg import apt import apt.debfile