Skip to content

Commit dd51812

Browse files
committed
bash: support empty background jobs on macOS
1 parent 358e836 commit dd51812

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test-wheel.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ launch_background_command() {
9494

9595
cleanup_background_jobs() {
9696
local pid=""
97-
for pid in "${background_pids[@]}"; do
97+
for pid in "${background_pids[@]:+${background_pids[@]}}"; do
9898
if kill -0 "$pid" >/dev/null 2>&1; then
9999
terminate_pid_tree "$pid"
100100
else
@@ -126,7 +126,7 @@ on_exit() {
126126
cleanup_virtualenv
127127

128128
if [[ ${#failed_pids[@]} -gt 0 ]]; then
129-
echo "The following background processes exited with nonzero status: ${failed_pids[@]}"
129+
echo "The following background processes exited with nonzero status: ${failed_pids[@]:+${failed_pids[@]}}"
130130
return 1
131131
fi
132132
return 0

0 commit comments

Comments
 (0)