From 41e4db0d9348476ea107af18ced6d521666a6d38 Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Thu, 12 Oct 2023 23:20:13 +0200 Subject: [PATCH] put possibly failing grep inside if expression --- .github/workflows/pr_analysis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_analysis.yml b/.github/workflows/pr_analysis.yml index 46805887de..fcb159b3e8 100644 --- a/.github/workflows/pr_analysis.yml +++ b/.github/workflows/pr_analysis.yml @@ -73,10 +73,8 @@ jobs: eb --missing --easystack ${{matrix.EASYSTACK_FILE}} > ${EB_MISSING_OUT} || true echo "eb done" echo "grep start" - grep '.* out of .* required modules missing:' ${EB_MISSING_OUT} - exit_code=$? - echo "grep done" - if [[ ${exit_code} -eq 0 ]]; then + + if [[ $(grep '.* out of .* required modules missing:' ${EB_MISSING_OUT}) ]]; then # there may be multiple sections with the above search string # we grab all lines listing missing modules and print a list of # unique modules only