fix(docker-compose): fix test for docker-compose executable (#12555)

This commit is contained in:
Denis Iskandarov 2024-07-15 20:36:07 +04:00 committed by GitHub
parent fd8f72b276
commit 4146c6be21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,8 @@
# support Compose v2 as docker CLI plugin # Support Compose v2 as docker CLI plugin
(( ${+commands[docker-compose]} )) && dccmd='docker-compose' || dccmd='docker compose' #
# This tests that the (old) docker-compose command is in $PATH and that
# it resolves to an existing executable file if it's a symlink.
[[ -x "${commands[docker-compose]:A}" ]] && dccmd='docker-compose' || dccmd='docker compose'
alias dco="$dccmd" alias dco="$dccmd"
alias dcb="$dccmd build" alias dcb="$dccmd build"