Skip to content

Commit

Permalink
Solve issues with docker compose detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Jul 23, 2024
1 parent 24cabc8 commit 5bcdcd9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ set -exuo

if [ -x "$(command -v docker-compose)" ]; then
DOCKER_CMD=docker-compose
elif $(docker compose &>/dev/null) && [ $? -eq 0 ]; then
DOCKER_CMD="docker compose"
else
echo "ERROR: neither \"docker-compose\" nor \"docker compose\" appear to be installed."
exit 1
docker compose &>/dev/null

if [ $? -eq 0 ]; then
DOCKER_CMD="docker compose"
else
echo "ERROR: neither \"docker-compose\" nor \"docker compose\" appear to be installed."
exit 1
fi
fi

DOCKER_SERVICE=${1:-rootless}
Expand Down

0 comments on commit 5bcdcd9

Please sign in to comment.