diff --git a/src/executeService.py b/src/executeService.py index b2dfe1f6b54f41038c10b2478fa50e458e29cc93..77f8f840fcc99ba6e28bd7e6184361a57bc58c60 100644 --- a/src/executeService.py +++ b/src/executeService.py @@ -33,7 +33,7 @@ class ExecuteService: def exec_popen(self, cmd, isPrint=True): if isPrint: self.print_cmd(cmd) - output = os.popen(cmd).readlines() + output = os.popen("bash -c \"{}\"".format(cmd)).readlines() return output def get_duration(self): @@ -47,7 +47,7 @@ class ExecuteService: cmd = self.join_cmd(cmds) if not cmd.startswith('echo'): self.print_cmd(cmd) - state = os.system(cmd) + state = os.system("bash -c \"{}\"".format(cmd)) self.end_time = self.tool.get_time_stamp() print(f"total time used: {self.get_duration()}s") logger.info(self.end_flag + cmd)