Skip to content

Commit 2d3e0ab

Browse files
committed
Ensure Bach runs in Bash
1 parent dc8918f commit 2d3e0ab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bach.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ if [ "$__major" -lt 4 ] || { [ "$__major" -eq 4 ] && [ "$__minor" -lt 3 ]; }; th
1111
echo "Error: Bach Unit Testing Framework requires Bash version 4.3 or higher. Your current version is ${BASH_VERSION:-unknown}." >&2
1212
exit 1
1313
fi
14+
if [ -z "${BASH_VERSION:-}" ] || [ -z "${BASH_SOURCE:-}" ]; then
15+
echo "Error: Bach Unit Testing Framework must be run in Bash. Please switch to Bash and try again."
16+
exit 1
17+
fi
1418
shopt -s expand_aliases
1519

1620
builtin export BACH_COLOR="${BACH_COLOR:-auto}"

0 commit comments

Comments
 (0)