Skip to content

Commit cc06d4a

Browse files
authored
Merge pull request #77 from buildkite-plugins/toote_minor_fixes
Minor fixes
2 parents 65f2a31 + 811deb3 commit cc06d4a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hooks/pre-exit

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ fi
4747
# Creates the annotations with all the report URLs
4848
annotation-link() {
4949
local json_file="$1"
50-
mapfile -t REPORT_URLS < <(sort "${json_file}" | uniq)
50+
REPORT_URLS=()
51+
while IFS= read -r line; do REPORT_URLS+=("${line}"); done < <(sort "${json_file}" | uniq)
5152

5253
local REPORTS=""
5354
REPORT_COUNT=1
@@ -189,7 +190,7 @@ find_and_upload() {
189190

190191
for index in "${!uploads_in_progress[@]}"; do
191192
# Note: kill -0 does not kill the pid, it provides a *nix compatible way to test the pid is responding.
192-
if ! kill -0 "${uploads_in_progress[index]}" > /dev/null; then
193+
if ! kill -0 "${uploads_in_progress[index]}" > /dev/null 2>&1; then
193194
unset 'uploads_in_progress[index]'
194195
elif [[ "$iterations_waited" -gt $TIMEOUT ]]; then
195196
echo "Upload '${uploads_in_progress[index]}' has been running for more than '${TIMEOUT}' seconds, killing it"
@@ -252,4 +253,4 @@ else
252253
fi
253254
if [ "$ANNOTATE" != "false" ]; then
254255
annotation-link "${REPORT_URLS_FILE}"
255-
fi
256+
fi

0 commit comments

Comments
 (0)