1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-09-29 12:38:26 +02:00

Do not change the value of IFS; instead, use readarray to read into an array

This commit is contained in:
Isaac Good 2019-09-01 16:39:43 -07:00
parent 03608115df
commit 890cdae32a

View File

@ -58,7 +58,7 @@ run() {
output="$("$@" 2>&1)"
status="$?"
oldIFS=$IFS
IFS=$'\n' lines=($output)
readarray -t lines <<< "$output"
[ -z "$e" ] || set -e
[ -z "$E" ] || set -E
[ -z "$T" ] || set -T