From c1686fb68718988e28ec89006132c96c5a0f83d2 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Mon, 11 Nov 2024 13:02:26 +0900 Subject: [PATCH] Don't fail grep if no matches --- .github/workflows/_diffcalc_processor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_diffcalc_processor.yml b/.github/workflows/_diffcalc_processor.yml index b193d82317..e08534fbff 100644 --- a/.github/workflows/_diffcalc_processor.yml +++ b/.github/workflows/_diffcalc_processor.yml @@ -84,7 +84,7 @@ jobs: PR_TEXT: ${{ inputs.pr-text }} run: | # Add comment environment - echo "${PR_TEXT}" | sed -r 's/\r$//' | grep -E '^\w+=' | while read -r line; do + echo "${PR_TEXT}" | sed -r 's/\r$//' | { grep -E '^\w+=' || true; } | while read -r line; do opt=$(echo "${line}" | cut -d '=' -f1) sed -i "s;^${opt}=.*$;${line};" "${{ env.GENERATOR_ENV }}" done