This commit is contained in:
2023-04-28 15:15:15 -07:00
parent 0e6e2f40e3
commit 48ce5df1b4
6 changed files with 148 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/bash
ARGS="$@"
exec 5>&1
OUTPUT=$(bash -c "butler $ARGS" | tee /dev/fd/5)
RESULT=$?
#Output multiline strings.
#https://trstringer.com/github-actions-multiline-strings/
if [[ -n "$OUTPUT" ]]; then
echo "console<<EOF" >> "$GITHUB_OUTPUT"
echo "$OUTPUT" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
fi
echo "exitCode=$RESULT" >> "$GITHUB_OUTPUT"
if [[ "$CATCH_ERRORS" != "true" ]]; then
exit $RESULT
fi