1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-11-17 11:42:33 +01: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)" output="$("$@" 2>&1)"
status="$?" status="$?"
oldIFS=$IFS oldIFS=$IFS
IFS=$'\n' lines=($output) readarray -t lines <<< "$output"
[ -z "$e" ] || set -e [ -z "$e" ] || set -e
[ -z "$E" ] || set -E [ -z "$E" ] || set -E
[ -z "$T" ] || set -T [ -z "$T" ] || set -T