1
0
mirror of https://github.com/sstephenson/bats.git synced 2024-11-17 11:42:33 +01:00

exec-test: Replace || { } with if [[ ]]; then

Somehow this is ever-so-slightly faster.
This commit is contained in:
Mike Bland 2017-02-15 11:10:55 -05:00
parent 741c414d6a
commit e613b31a1c
No known key found for this signature in database
GPG Key ID: 5121C73A6E07384B

View File

@ -39,10 +39,10 @@ load() {
filename="$BATS_TEST_DIRNAME/${name}.bash"
fi
[ -f "$filename" ] || {
if [[ ! -f "$filename" ]]; then
echo "bats: $filename does not exist" >&2
exit 1
}
fi
source "${filename}"
}