fix(docker-compose)!: check for old command instead of calling docker (#10409)

BREAKING CHANGE: the plugin now checks for the `docker-compose` command instead
of trying whether `docker compose` is a valid command. This means that if the
old command is still installed it will be used instead. To use `docker compose`,
uninstall any old copies of `docker-compose`.

Fixes #10409
This commit is contained in:
Marc Cornellà 2021-11-17 10:35:32 +01:00
parent b60b3f1842
commit 88e72e8a54

View file

@ -1,7 +1,5 @@
# support Compose v2 as docker CLI plugin
DOCKER_CONTEXT=default command docker compose &>/dev/null \
&& dccmd='docker compose' \
|| dccmd='docker-compose'
(( ${+commands[docker-compose]} )) && dccmd='docker-compose' || dccmd='docker compose'
alias dco="$dccmd"
alias dcb="$dccmd build"