This commit is contained in:
GammaGames 2024-11-25 10:29:44 -07:00
parent 765833ffce
commit 1a1adf6ba5
2 changed files with 7 additions and 5 deletions

View file

@ -136,6 +136,8 @@ runs:
INPUT_PROXY_USE_INSECURE_CIPHER: ${{ inputs.proxy_use_insecure_cipher }}
INPUT_PROXY_CIPHER: ${{ inputs.proxy_cipher }}
INPUT_SYNC: ${{ inputs.sync }}
INPUT_CAPTURE_STDOUT: ${{ inputs.capture_stdout }}
INPUT_CAPTURE_STDERR: ${{ inputs.capture_stderr }}
branding:
icon: "terminal"

View file

@ -68,13 +68,13 @@ chmod +x ${TARGET}
echo "======= CLI Version ======="
sh -c "${TARGET} --version" # print version
echo "==========================="
if [ "${{ inputs.capture_stdout }}" == 'true' ] || [ "${{ inputs.capture_stderr }}" == 'true' ]; then
if [ "$INPUT_CAPTURE_STDOUT" == 'true' ] || [ "$INPUT_CAPTURE_STDERR" == 'true' ]; then
_stdout=/dev/stdout
_stderr=/dev/stderr
if [ "${{ inputs.capture_stdout }}" == 'true' ]; then
if [ "$INPUT_CAPTURE_STDOUT" == 'true' ]; then
_stdout=/tmp/outFile
fi
if [ "${{ inputs.capture_stderr }}" == 'true' ]; then
if [ "$INPUT_CAPTURE_STDERR" == 'true' ]; then
_stderr=/tmp/errFile
fi
@ -82,11 +82,11 @@ if [ "${{ inputs.capture_stdout }}" == 'true' ] || [ "${{ inputs.capture_stderr
sh -c "${TARGET} $*" # run the command
} 2> $_stderr | tee $_stdout
if [ "${{ inputs.capture_stdout }}" == 'true' ]; then
if [ "$INPUT_CAPTURE_STDOUT" == 'true' ]; then
stdout=$(cat $_stdout)
echo "stdout=${stdout//$'\n'/\\n}" >> $GITHUB_OUTPUT
fi
if [ "${{ inputs.capture_stderr }}" == 'true' ]; then
if [ "$INPUT_CAPTURE_STDERR" == 'true' ]; then
stderr=$(cat $_stderr)
echo "stderr=${stderr//$'\n'/\\n}" >> $GITHUB_OUTPUT
fi