Skip to content

Commit 97085fa

Browse files
committed
[CI] install docker-compose with retry (#24069)
1 parent f32bf19 commit 97085fa

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.ci/scripts/install-docker-compose.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,12 @@ DC_CMD="${HOME}/bin/docker-compose"
99

1010
mkdir -p "${HOME}/bin"
1111

12-
curl -sSLo "${DC_CMD}" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)"
13-
chmod +x "${DC_CMD}"
12+
if curl -sSLo "${DC_CMD}" "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" ; then
13+
chmod +x "${DC_CMD}"
14+
else
15+
echo "Something bad with the download, let's delete the corrupted binary"
16+
if [ -e "${DC_CMD}" ] ; then
17+
rm "${DC_CMD}"
18+
fi
19+
exit 1
20+
fi

0 commit comments

Comments
 (0)