Skip to content

Commit

Permalink
Merge pull request #83 from devops-infra/bugfix/echo-e
Browse files Browse the repository at this point in the history
Fix for echo -e
  • Loading branch information
ChristophShyper committed Apr 20, 2022
2 parents dee3305 + 322d321 commit 7fa04e3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ done
if [[ -z "${INPUT_GITHUB_TOKEN}" ]]; then
# shellcheck disable=SC2016
MESSAGE='Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}".'
echo "[ERROR] ${MESSAGE}"
echo -e "[ERROR] ${MESSAGE}"
exit 1
fi

Expand Down Expand Up @@ -129,12 +129,14 @@ TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's|\^HaSz\^|#|g' | sed ':a;N;$!ba; s|\^No
if [[ -z "${PR_NUMBER}" ]]; then
echo -e "\nSetting all arguments..."
if [[ -n "${INPUT_TITLE}" ]]; then
TITLE=$(echo "${INPUT_TITLE}" | head -1)
TITLE=$(echo -e "${INPUT_TITLE}" | head -1)
else
TITLE=$(git log -1 --pretty=%s | head -1)
fi
# shellcheck disable=SC2001
TEMPLATE=$(echo "${TEMPLATE}" | sed 's/\`/\\`/g') # fix for '`' marks in template
TITLE=$(echo -e "${TITLE}" | sed 's/\`/\\`/g') # fix for '`' marks in title
# shellcheck disable=SC2001
TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's/\`/\\`/g') # fix for '`' marks in template
ARG_LIST=()
ARG_LIST+=("-m \"${TITLE}\"")
ARG_LIST+=("-m \"${TEMPLATE}\"")
Expand All @@ -154,7 +156,7 @@ if [[ -z "${PR_NUMBER}" ]]; then
ARG_LIST+=("-d")
fi
else
echo "${TEMPLATE}" > /tmp/template
echo -e "${TEMPLATE}" > /tmp/template
fi

if [[ -z "${PR_NUMBER}" ]]; then
Expand Down

0 comments on commit 7fa04e3

Please sign in to comment.