From ca619ea3106676d51be2d97ce26eb950ed827ffc Mon Sep 17 00:00:00 2001 From: Marco Carrozzo Date: Fri, 20 Jan 2023 14:16:24 +0100 Subject: [PATCH] set error --- .github/actions/download-cache-and-artifacts/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/download-cache-and-artifacts/action.yml b/.github/actions/download-cache-and-artifacts/action.yml index d1d356ab0f..970ac87c41 100644 --- a/.github/actions/download-cache-and-artifacts/action.yml +++ b/.github/actions/download-cache-and-artifacts/action.yml @@ -44,9 +44,9 @@ runs: for i in "${packages[@]}"; do echo "C-$i" REMOTE_FILE_PATH="s3://${S3_BUILD_BUCKET_SHORT_NAME}/${REMOTE_PATH}/$i.tar.gz" - cache_exists=$(aws s3 ls $REMOTE_FILE_PATH > /dev/null) + set +e; cache_exists=$(aws s3 ls $REMOTE_FILE_PATH > /dev/null); set -e echo "D-$i" - if [ $cache_exists -eq 0 ]; then + if [ aws s3 ls $REMOTE_FILE_PATH > /dev/null -eq 0 ]; then echo "downloading persistent cache artifacts from $REMOTE_FILE_PATH" aws s3 cp --no-progress REMOTE_FILE_PATH $i.tar.gz du -h $i.tar.gz