Skip to content

Commit f115f97

Browse files
author
Gary Lockett
committed
use suggested fix to use readarray still, avoiding file descriptors
Signed-off-by: Gary Lockett <[email protected]>
1 parent f9af5e2 commit f115f97

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

entrypoint.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,10 @@ if [[ "${PHP}" == "" ]];then
142142
fi
143143

144144
declare -a BEFORE_SCRIPT=()
145-
while IFS='' read -r line; do
146-
BEFORE_SCRIPT+=("$line")
147-
done < <(echo "${JOB}" | jq -rc '(.before_script // [])[]')
145+
readarray -t BEFORE_SCRIPT < <(echo "${JOB}" | jq -rc '(.before_script // [])[]' )
148146

149147
declare -a AFTER_SCRIPT=()
150-
while IFS='' read -r line; do
151-
AFTER_SCRIPT+=("$line")
152-
done < <(echo "${JOB}" | jq -rc '(.after_script // [])[]')
148+
readarray -t AFTER_SCRIPT < <(echo "${JOB}" | jq -rc '(.after_script // [])[]' )
153149

154150

155151
echo "Marking PHP ${PHP} as configured default"

0 commit comments

Comments
 (0)