This commit is contained in:
2023-03-22 02:10:59 -07:00
parent 25694362f0
commit 2d58a306c2
4 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/sh
WORKDIR="$1"
cd "$WORKDIR"
ARGS_ARRAY=($@)
ARGS=${array[@]:1}
OUTPUT=$(bash -c "$ARGS")
RESULT=$?
echo "$OUTPUT"
#Output multiline strings.
#https://trstringer.com/github-actions-multiline-strings/
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=console::$OUTPUT"
exit $RESULT