From a5b09f45d524dc9e5e3950a479283620fc02f9b7 Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Tue, 20 Jun 2023 15:15:53 +0200 Subject: [PATCH] fixed install multiples packages at once --- src/utils/machine.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/machine.py b/src/utils/machine.py index 8d3870e..415f951 100644 --- a/src/utils/machine.py +++ b/src/utils/machine.py @@ -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)