Skip to content

Commit 278b19f

Browse files
committed
Kill tail even if concurrent command fails
1 parent 2c9bd5d commit 278b19f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

travis-ci

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ fi
2727

2828
finish() {
2929
if [ -f "$TMP.$1" ]; then
30+
local EXIT=0
3031
tail -n 1000 -f "$TMP.$1" &
3132
local PID=$!
32-
wait "${!1}"
33+
if ! wait "${!1}"; then
34+
EXIT=$?
35+
fi
3336
kill -9 $PID
3437
rm -f "$TMP.$1"
38+
return $EXIT
3539
fi
3640
}
3741

0 commit comments

Comments
 (0)