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