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.
pull/415/head
Bonobo 1 month ago
parent b838bc2f27
commit d3b63444cd

@ -71,9 +71,10 @@ if ! "${TARGET}" --version; then
fi
echo "======================================="
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}"
echo 'EOF' >> "${GITHUB_OUTPUT}"
echo "${OUTPUT_DELIMITER}" >> "${GITHUB_OUTPUT}"
else
"${TARGET}" "$@"
fi

Loading…
Cancel
Save