mirror of
https://github.com/sstephenson/bats.git
synced 2025-03-03 23:39:48 +01:00
exec-test: Replace || { }
with if [[ ]]; then
Somehow this is ever-so-slightly faster.
This commit is contained in:
parent
741c414d6a
commit
e613b31a1c
|
@ -39,10 +39,10 @@ load() {
|
||||||
filename="$BATS_TEST_DIRNAME/${name}.bash"
|
filename="$BATS_TEST_DIRNAME/${name}.bash"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -f "$filename" ] || {
|
if [[ ! -f "$filename" ]]; then
|
||||||
echo "bats: $filename does not exist" >&2
|
echo "bats: $filename does not exist" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
fi
|
||||||
|
|
||||||
source "${filename}"
|
source "${filename}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user