Skip to content

Commit 5682a5d

Browse files
committed
Improve docker compose test.
1 parent 4423f17 commit 5682a5d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docker-compose.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export BUILDKIT_PROGRESS=plain
2828
export PROGRESS_NO_TRUNC=1
2929

3030
# Check if docker compose command is available
31-
if [ -x "`command -v docker-compose &> /dev/null`" ]; then
32-
DOCKER_COMPOSE=docker-compose
33-
elif [ -x "`command -v docker compose &> /dev/null`" ]; then
31+
if [ -x "$(command -v docker-compose)" ]; then
32+
DOCKER_COMPOSE="docker-compose"
33+
elif $(docker compose &>/dev/null) && [ $? -eq 0 ]; then
3434
DOCKER_COMPOSE="docker compose"
3535
else
3636
echo "Docker Compose not installed, install it and re-run the script"

0 commit comments

Comments
 (0)