From fe9cfcb822527422667459008fe015a364c9f13b Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 11 Sep 2018 17:19:48 +0200 Subject: [PATCH] fix: ``down`` action is supported We force ``--remove-orphans`` as it'll remove all the previous dockers that have been launched in the same project. We don't need to compute anything for this. --- bin/compose | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/compose b/bin/compose index e11d8f7..65a0b98 100755 --- a/bin/compose +++ b/bin/compose @@ -2505,7 +2505,7 @@ case "$action" in run) services="${action_posargs[0]}" ;; - "") + ""|down) services= ;; *) @@ -2546,7 +2546,7 @@ case "$action" in full_init=true post_hook=true ;; - "") + ""|down) full_init= ;; *) @@ -2604,6 +2604,10 @@ case "$action" in launch_docker_compose "${compose_opts[@]}" "$action" "${action_opts[@]}" "${remainder_args[@]}" warn "Runtime configuration modification (from relations) are not included here." ;; + down) + remainder_args+=("--remove-orphans") + launch_docker_compose "${compose_opts[@]}" "$action" "${action_opts[@]}" "${remainder_args[@]}" + ;; *) if [ "$is_service_action" ]; then run_service_action "$SERVICE_PACK" "$action" "${remainder_args[@]}"