Browse Source

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.
raw-remaining-args
Valentin Lab 6 years ago
parent
commit
fe9cfcb822
  1. 8
      bin/compose

8
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[@]}"

Loading…
Cancel
Save