mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
test_driver: Error out if $FISHDIR isn't given
This avoids confusion when you forget to set it and run it on the wrong fish.
This commit is contained in:
@@ -34,8 +34,12 @@ die() {
|
|||||||
TESTS_ROOT="$(cd $(dirname "$0") && pwd -P)"
|
TESTS_ROOT="$(cd $(dirname "$0") && pwd -P)"
|
||||||
BUILD_ROOT="$(cd $(dirname "$TESTS_ROOT") && pwd -P)"
|
BUILD_ROOT="$(cd $(dirname "$TESTS_ROOT") && pwd -P)"
|
||||||
|
|
||||||
test -n "$FISHDIR" && FISHDIR=$(realpath -- "$FISHDIR")
|
if test -z "$FISHDIR"; then
|
||||||
fish="${FISHDIR:-${BUILD_ROOT}/test/root/bin}/fish"
|
die "Please set \$FISHDIR to a directory that contains fish, fish_indent and fish_key_reader"
|
||||||
|
fi
|
||||||
|
|
||||||
|
FISHDIR=$(realpath -- "$FISHDIR")
|
||||||
|
fish="${FISHDIR}/fish"
|
||||||
|
|
||||||
if ! test -x "$fish" || ! test -f "$fish"; then
|
if ! test -x "$fish" || ! test -f "$fish"; then
|
||||||
printf '%s\n' "'$fish' is not an executable fish." \
|
printf '%s\n' "'$fish' is not an executable fish." \
|
||||||
|
|||||||
Reference in New Issue
Block a user