Skip to content

Commit

Permalink
Fix bats-core#353 (CTRL-C a run command hangs)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-schulze-vireso authored and sublimino committed Sep 16, 2020
1 parent 78d030b commit 28acac2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libexec/bats-core/bats-exec-test
Expand Up @@ -104,7 +104,7 @@ bats_exit_trap() {
bats_print_failed_command >&3

while IFS= read -r line; do
printf '# %s\n' "$line"
printf '# %s\n' "$line" || break # avoid feedback loop when errors are redirected into BATS_OUT (see #353)
done <"$BATS_OUT" >&3
if [[ -n "$line" ]]; then
printf '# %s\n' "$line"
Expand Down

0 comments on commit 28acac2

Please sign in to comment.