Skip to content

Commit c05c314

Browse files
committed
chore: improve logic: don't imply failures if there are none; don't pass the build if there are failures (RHIDP-9067)
Signed-off-by: Nick Boldt <nboldt@redhat.com>
1 parent 45ff7cb commit c05c314

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

export-dynamic/export-dynamic.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ else
159159
set -e
160160
popd > /dev/null
161161
done < "${INPUTS_PLUGINS_FILE}"
162-
echo "Plugins with failed exports: ${errors[*]}"
162+
if [[ ${#errors[@]} -gt 0 ]]; then
163+
echo "Plugins with failed exports: ${errors[*]}"
164+
fi
163165
fi
164166

165167
FAILED_EXPORTS_OUTPUT=${FAILED_EXPORTS_OUTPUT:-"failed-exports-output"}
@@ -194,3 +196,6 @@ then
194196
echo "WORKSPACE_SKIPPED_UNCHANGED_SINCE=false" >> $GITHUB_OUTPUT
195197
fi
196198
fi
199+
200+
# exit a return code equivalent to the number of errors
201+
exit $((${#errors[@]}))

0 commit comments

Comments
 (0)