mirror of
https://github.com/appleboy/ssh-action.git
synced 2026-08-22 08:22:55 +00:00
Merge f39ff007253f7a61459ecbd0878d6ab14a8ca84d into c4f70287fc37c43b14b30b407224bbbc8e8c6327
This commit is contained in:
commit
8f754ac2dd
@ -109,8 +109,17 @@ fi
|
|||||||
echo "======================================="
|
echo "======================================="
|
||||||
if [[ "${INPUT_CAPTURE_STDOUT}" == 'true' ]]; then
|
if [[ "${INPUT_CAPTURE_STDOUT}" == 'true' ]]; then
|
||||||
echo 'stdout<<EOF' >> "${GITHUB_OUTPUT}"
|
echo 'stdout<<EOF' >> "${GITHUB_OUTPUT}"
|
||||||
"${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"
|
if "${TARGET}" "$@" | tee -a "${GITHUB_OUTPUT}"; then
|
||||||
|
capture_status=0
|
||||||
|
else
|
||||||
|
capture_status=$?
|
||||||
|
fi
|
||||||
|
output_last_byte_newline_count="$(tail -c 1 "${GITHUB_OUTPUT}" | wc -l)"
|
||||||
|
if [[ "${output_last_byte_newline_count}" -eq 0 ]]; then
|
||||||
|
echo >> "${GITHUB_OUTPUT}"
|
||||||
|
fi
|
||||||
echo 'EOF' >> "${GITHUB_OUTPUT}"
|
echo 'EOF' >> "${GITHUB_OUTPUT}"
|
||||||
|
exit "${capture_status}"
|
||||||
else
|
else
|
||||||
"${TARGET}" "$@"
|
"${TARGET}" "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user