diff --git a/test.sh b/test.sh index 73e7e93..7da638e 100755 --- a/test.sh +++ b/test.sh @@ -18,7 +18,9 @@ cleanup() { rm -rf "${tmpdir}" pids=() jobs -p | while IFS="" read -r line; do pids+=("$line"); done - kill "${pids[@]}" + if (( "${#pids[@]}" > 0)) ; then + kill "${pids[@]}" + fi } download_iso() {