Skip to content

Commit 4cd7486

Browse files
committed
Make sure we always run BATS with --errexit
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
1 parent aad73df commit 4cd7486

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hack/bats/helpers/load.bash

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33

44
set -o errexit -o nounset -o pipefail
55

6+
# Make sure run() will execute all functions with errexit enabled.
7+
# This enables the functionality from https://github.com/lima-vm/bats-core/commit/507da84de75fa78798d53eceb42e68851ef5c48b
8+
# The upstream PR https://github.com/bats-core/bats-core/pull/1118 is still open, so our submodule points to the PR commit.
9+
export BATS_RUN_ERREXIT=1
10+
611
# Don't run the tests in ~/.lima because they may destroy _config, _templates etc.
712
export LIMA_HOME=${LIMA_BATS_LIMA_HOME:-$HOME/.lima-bats}
813

0 commit comments

Comments
 (0)