fixed install multiples packages at once

This commit is contained in:
Mathieu Broillet 2023-06-20 15:15:53 +02:00
parent 6d3d9b3fbc
commit a5b09f45d5
No known key found for this signature in database
GPG Key ID: 7D4F25BC50A0AA32

View File

@ -244,9 +244,13 @@ class LinuxMachine():
"""
if type(package) is list:
packages = []
for p in package:
self.run_command(f"{utils.get_install_package_command(self.get_os_name())} {package}",
return_status_code=True, use_ssh=use_ssh)
packages.append(p)
self.run_command(
f"{utils.get_install_package_command(self.get_os_name())} {' '.join(packages)}",
return_status_code=True)
else:
self.run_command(f"{utils.get_install_package_command(self.get_os_name())} {package}",
return_status_code=True, use_ssh=use_ssh)