diff --git a/.github/actions/xahau-actions-cache-restore/action.yml b/.github/actions/xahau-actions-cache-restore/action.yml index 712dae303..37daea123 100644 --- a/.github/actions/xahau-actions-cache-restore/action.yml +++ b/.github/actions/xahau-actions-cache-restore/action.yml @@ -106,7 +106,7 @@ runs: # Delete all delta layers for this key echo "Deleting all delta layers matching: ${CACHE_KEY}-delta-*" - DELTA_COUNT=$(aws s3 ls "s3://${S3_BUCKET}/" --region "${S3_REGION}" | grep "${CACHE_KEY}-delta-" | wc -l) + DELTA_COUNT=$(aws s3 ls "s3://${S3_BUCKET}/" --region "${S3_REGION}" | grep "${CACHE_KEY}-delta-" | wc -l || echo "0") if [ "${DELTA_COUNT}" -gt 0 ]; then aws s3 rm "s3://${S3_BUCKET}/" --recursive \ --exclude "*" \