mirror of
https://github.com/containers/podman-compose.git
synced 2025-05-20 14:10:56 +02:00
Skip running compose-down during up when there are no active containers
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
parent
abe5965c9a
commit
eba2ca2695
1
newsfragments/down-during-up-no-containers.bugfix
Normal file
1
newsfragments/down-during-up-no-containers.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Skip running compose-down during up when there are no active containers
|
@ -2891,7 +2891,7 @@ async def compose_up(compose: PodmanCompose, args):
|
|||||||
.splitlines()
|
.splitlines()
|
||||||
)
|
)
|
||||||
diff_hashes = [i for i in hashes if i and i != compose.yaml_hash]
|
diff_hashes = [i for i in hashes if i and i != compose.yaml_hash]
|
||||||
if args.force_recreate or len(diff_hashes):
|
if (args.force_recreate and len(hashes) > 0) or len(diff_hashes):
|
||||||
log.info("recreating: ...")
|
log.info("recreating: ...")
|
||||||
down_args = argparse.Namespace(**dict(args.__dict__, volumes=False, rmi=None))
|
down_args = argparse.Namespace(**dict(args.__dict__, volumes=False, rmi=None))
|
||||||
await compose.commands["down"](compose, down_args)
|
await compose.commands["down"](compose, down_args)
|
||||||
|
Loading…
Reference in New Issue
Block a user