diff --git a/bin/run_fawltydeps b/bin/run_fawltydeps index e39ad64..10a48ee 100755 --- a/bin/run_fawltydeps +++ b/bin/run_fawltydeps @@ -10,21 +10,24 @@ exit_code=$? # See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings DELIMITER=$(echo $RANDOM | md5sum | head -c 20) { - echo "fawltydeps-output<<${DELIMITER}" - echo "${fawltydeps_result}" - echo "${DELIMITER}" -} >> "${GITHUB_OUTPUT}" + echo "fawltydeps-output<<$DELIMITER" + echo "$fawltydeps_result" + echo "$DELIMITER" +} >> "$GITHUB_OUTPUT" -if [[ "$exit_code" -eq 0 ]]; then - echo "OK: 'fawltydeps $*' :rocket:" > "$GITHUB_STEP_SUMMARY" -else - echo "Error: 'fawltydeps $*' found issues:" -fi -if [[ -n "${fawltydeps_result}" ]]; then - # shellcheck disable=SC2006 - cat < "$GITHUB_STEP_SUMMARY" +{ + if [[ "$exit_code" -eq 0 ]]; then + echo "OK: 'fawltydeps $*' :rocket:" + else + echo "Error: 'fawltydeps $*' found issues:" + fi + if [[ -n "${fawltydeps_result}" ]]; then + # shellcheck disable=SC2006 + cat <> "$GITHUB_STEP_SUMMARY" exit $exit_code