diff --git a/bin/sdk/mount/mutagen.sh b/bin/sdk/mount/mutagen.sh index 95366bd0d..a22cd7fda 100644 --- a/bin/sdk/mount/mutagen.sh +++ b/bin/sdk/mount/mutagen.sh @@ -26,6 +26,7 @@ function Mount::Mutagen::beforeUp() { # The volume will not be deleted if any app container is running. docker volume rm "${SPRYKER_SYNC_VOLUME}" >/dev/null 2>&1 || true + updateComposeCovertWindowsPaths terminateMutagenSessionsWithObsoleteDockerId # Clean content of the sync volume if the sync session is terminated or halted. @@ -38,6 +39,16 @@ function Mount::Mutagen::beforeUp() { fi } +# https://github.com/docker/compose/issues/9428 +function updateComposeCovertWindowsPaths() { + local mutagenInstalledVersion="$(Mount::Mutagen::getInstalledVersion)" + local installedVersion=$(Version::parse ${mutagenInstalledVersion}) + + if [ "${installedVersion:0:2}" -ge 14 ]; then + export COMPOSE_CONVERT_WINDOWS_PATHS=0 + fi +} + function terminateMutagenSessionsWithObsoleteDockerId() { dockerId=$(docker info --format '{{.ID}}' 2>/dev/null | awk '{ gsub(":","_",$1); print $1 }' || echo '')