fix(output): randomize captured output delimiter

A standalone EOF line is valid remote stdout, but the runner interprets it as the end of the captured multiline value.

Generate one Bash-only randomized delimiter per capture and use it for both framing lines while preserving the streaming tee pipeline and its failure behavior.
This commit is contained in:
Bonobo 2026-08-10 03:16:19 +02:00
parent b838bc2f27
commit d3b63444cd

View File

@ -71,9 +71,10 @@ if ! "${TARGET}" --version; then
fi fi
echo "=======================================" echo "======================================="
if [[ "${INPUT_CAPTURE_STDOUT}" == 'true' ]]; then if [[ "${INPUT_CAPTURE_STDOUT}" == 'true' ]]; then
echo 'stdout<<EOF' >> "${GITHUB_OUTPUT}" OUTPUT_DELIMITER="EOF_${RANDOM}_${RANDOM}_${RANDOM}_${RANDOM}_${RANDOM}_${RANDOM}_${RANDOM}_${RANDOM}"
echo "stdout<<${OUTPUT_DELIMITER}" >> "${GITHUB_OUTPUT}"
"${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}" "${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"
echo 'EOF' >> "${GITHUB_OUTPUT}" echo "${OUTPUT_DELIMITER}" >> "${GITHUB_OUTPUT}"
else else
"${TARGET}" "$@" "${TARGET}" "$@"
fi fi