mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-22 16:03:16 +01:00
use exec for wait
This commit is contained in:
parent
8a72321720
commit
f820594257
@ -1024,6 +1024,18 @@ class Podman:
|
||||
log(cmd_ls)
|
||||
return subprocess.check_output(cmd_ls)
|
||||
|
||||
def exec(
|
||||
self,
|
||||
podman_args,
|
||||
cmd="",
|
||||
cmd_args=None,
|
||||
):
|
||||
cmd_args = list(map(str, cmd_args or []))
|
||||
xargs = self.compose.get_podman_args(cmd) if cmd else []
|
||||
cmd_ls = [self.podman_path, *podman_args, cmd] + xargs + cmd_args
|
||||
log(" ".join([str(i) for i in cmd_ls]))
|
||||
os.execlp(self.podman_path, *cmd_ls)
|
||||
|
||||
def run(
|
||||
self,
|
||||
podman_args,
|
||||
@ -1703,7 +1715,7 @@ def compose_wait(compose, args): # pylint: disable=unused-argument
|
||||
containers = [cnt["name"] for cnt in compose.containers]
|
||||
cmd_args = ["--"]
|
||||
cmd_args.extend(containers)
|
||||
compose.podman.run([], "wait", cmd_args, sleep=0)
|
||||
compose.podman.exec([], "wait", cmd_args)
|
||||
|
||||
|
||||
@cmd_run(podman_compose, "systemd")
|
||||
|
Loading…
Reference in New Issue
Block a user