Skip to content

Commit 49c5486

Browse files
committed
🤡 Ensure it works on old Bash
1 parent cebcfd9 commit 49c5486

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/bazel-bep.bash

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ process_bep() {
8181
local skip_count=0
8282
local cached_count=0
8383

84-
# Arrays for successful targets
84+
# Arrays for successul targets
8585
declare -a successful_targets=()
86+
declare -a successful_targets_sorted=()
8687

8788
# Arrays for test performance tracking
8889
declare -a slowest_tests=()
@@ -364,8 +365,9 @@ process_bep() {
364365
365366
"
366367

367-
# Sort the targets for better readability
368-
readarray -t successful_targets_sorted < <(printf '%s\n' "${successful_targets[@]}" | sort)
368+
if [ ${#successful_targets[@]} -gt 0 ]; then
369+
IFS=$'\n' successful_targets_sorted=($(printf '%s\n' "${successful_targets[@]}" | sort))
370+
fi
369371

370372
# Show all targets
371373
for target in "${successful_targets_sorted[@]}"; do

0 commit comments

Comments
 (0)