Skip to content

Commit f2ab724

Browse files
committed
fix(parallel): prevent spinner cleanup from failing in strict mode
The disown && kill command could fail if the spinner process already finished, causing non-zero exit code in strict mode. Split into separate commands with || true to ensure they never fail.
1 parent cda6633 commit f2ab724

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/runner.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ function bashunit::runner::load_test_files() {
102102
local spinner_pid=$!
103103
bashunit::parallel::aggregate_test_results "$TEMP_DIR_PARALLEL_TEST_SUITE"
104104
# Kill the spinner once the aggregation finishes
105-
disown "$spinner_pid" && kill "$spinner_pid" &>/dev/null
105+
disown "$spinner_pid" 2>/dev/null || true
106+
kill "$spinner_pid" 2>/dev/null || true
106107
printf "\r \r" # Clear the spinner output
107108
local script_id
108109
for script_id in "${scripts_ids[@]+"${scripts_ids[@]}"}"; do

0 commit comments

Comments
 (0)