Skip to content

Commit

Permalink
Merge pull request #123 from internalsystemerror/1.24.x
Browse files Browse the repository at this point in the history
Ensure `BEFORE_SCRIPT` and `AFTER_SCRIPT` are populated correctly
  • Loading branch information
Gary Lockett authored Aug 22, 2022
2 parents 7a6722b + f115f97 commit 0759bbc
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,10 @@ if [[ "${PHP}" == "" ]];then
fi

declare -a BEFORE_SCRIPT=()
BEFORE_SCRIPT_STRING="$(echo "${JOB}" | jq -rc '(.before_script // [])[]' | tr -d '\n')"
if [[ "${BEFORE_SCRIPT_STRING}" != "" ]]; then
readarray -t BEFORE_SCRIPT="${BEFORE_SCRIPT_STRING}"
fi
readarray -t BEFORE_SCRIPT < <(echo "${JOB}" | jq -rc '(.before_script // [])[]' )

declare -a AFTER_SCRIPT=()
AFTER_SCRIPT_STRING="$(echo "${JOB}" | jq -rc '(.after_script // [])[]' | tr -d '\n')"
if [[ "${AFTER_SCRIPT_STRING}" != "" ]]; then
readarray -t AFTER_SCRIPT="${AFTER_SCRIPT_STRING}"
fi
readarray -t AFTER_SCRIPT < <(echo "${JOB}" | jq -rc '(.after_script // [])[]' )


echo "Marking PHP ${PHP} as configured default"
Expand Down

0 comments on commit 0759bbc

Please sign in to comment.