Skip to content

Commit

Permalink
Fix DockerCompose incompatibility (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed May 10, 2022
1 parent 2b08ee6 commit ee7e4aa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/environment/docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ function Environment::checkDockerComposeVersion() {
exit 1
fi

updateComposeCovertWindowsPaths

Console::end "[OK]"
}

Expand Down Expand Up @@ -79,4 +81,13 @@ function Environment::getDockerComposeTTY() {
fi
}

# https://github.com/docker/compose/issues/9428
function updateComposeCovertWindowsPaths() {
local dockerComposeVersion="2.5.0"

if [ "$(Version::parse "${installedVersion}")" -ge "$(Version::parse "${dockerComposeVersion}")" ]; then
export COMPOSE_CONVERT_WINDOWS_PATHS=0
fi
}

Registry::addChecker 'Environment::checkDockerComposeVersion'

0 comments on commit ee7e4aa

Please sign in to comment.