This commit is contained in:
Muayyad alsadi 2022-07-14 00:59:10 +03:00
parent ccdb98c0e4
commit ae6be272b5

View File

@ -2367,11 +2367,15 @@ def compose_unpause(compose, args):
compose.podman.run([], "unpause", targets)
@cmd_run(podman_compose, "kill", "Kill one or more running containers with a specific signal")
@cmd_run(
podman_compose, "kill", "Kill one or more running containers with a specific signal"
)
def compose_kill(compose, args):
# to ensure that the user did not execute the command by mistake
if not args.services and not args.all:
print("Error: you must provide at least one service name or use (--all) to kill all services")
print(
"Error: you must provide at least one service name or use (--all) to kill all services"
)
sys.exit()
container_names_by_service = compose.container_names_by_service