installer: fix docker compose command determination (#307)

This commit is contained in:
Applexad 2023-12-06 22:42:22 +08:00 committed by GitHub
parent d790ca04d6
commit 1bcddf1944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -795,7 +795,7 @@ clean_all() {
select_version() { select_version() {
DOCKER_COMPOSE_COMMAND="" DOCKER_COMPOSE_COMMAND=""
if command -v docker compose >/dev/null 2>&1; then if docker compose version >/dev/null 2>&1; then
DOCKER_COMPOSE_COMMAND="docker compose" DOCKER_COMPOSE_COMMAND="docker compose"
elif command -v docker-compose >/dev/null 2>&1; then elif command -v docker-compose >/dev/null 2>&1; then
DOCKER_COMPOSE_COMMAND="docker-compose" DOCKER_COMPOSE_COMMAND="docker-compose"

View File

@ -793,7 +793,7 @@ clean_all() {
select_version() { select_version() {
DOCKER_COMPOSE_COMMAND="" DOCKER_COMPOSE_COMMAND=""
if command -v docker compose >/dev/null 2>&1; then if docker compose version >/dev/null 2>&1; then
DOCKER_COMPOSE_COMMAND="docker compose" DOCKER_COMPOSE_COMMAND="docker compose"
elif command -v docker-compose >/dev/null 2>&1; then elif command -v docker-compose >/dev/null 2>&1; then
DOCKER_COMPOSE_COMMAND="docker-compose" DOCKER_COMPOSE_COMMAND="docker-compose"