Skip to content

Commit

Permalink
Check STANDALONE_COMPOSE_VERSION if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
aminvakil committed Mar 3, 2025
1 parent 084833a commit 6d85710
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions install/check-minimum-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ if [[ -z "$COMPOSE_VERSION" ]]; then
exit 1
fi

STANDALONE_COMPOSE_VERSION=$($dc_base_standalone version --short || echo '')
if [[ "$(vergte ${COMPOSE_VERSION//v/} ${STANDALONE_COMPOSE_VERSION//v/})" -eq 1 ]]; then
COMPOSE_VERSION="${STANDALONE_COMPOSE_VERSION}"
dc_base='docker-compose'
STANDALONE_COMPOSE_VERSION=$($dc_base_standalone version --short &>/dev/null || echo '')
if [[ ! -z "${STANDALONE_COMPOSE_VERSION}" ]]; then
if [[ "$(vergte ${COMPOSE_VERSION//v/} ${STANDALONE_COMPOSE_VERSION//v/})" -eq 1 ]]; then
COMPOSE_VERSION="${STANDALONE_COMPOSE_VERSION}"
dc_base='docker-compose'
fi
fi

if [[ "$(vergte ${COMPOSE_VERSION//v/} $MIN_COMPOSE_VERSION)" -eq 1 ]]; then
Expand Down

0 comments on commit 6d85710

Please sign in to comment.