From 91dea961f823068045cdc777eff0327767c46b02 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Sun, 21 Apr 2019 00:33:46 +0200 Subject: [PATCH] safety check --- scripts/unittest | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/unittest b/scripts/unittest index fe0625b092..9baf52058a 100755 --- a/scripts/unittest +++ b/scripts/unittest @@ -34,13 +34,13 @@ fi declare -a EXTRA_ARGS if [ -z "${ARANGOSH}" ]; then - if [ -x build/bin/arangosh ]; then + if [ -x build/bin/arangosh -a ! -d build/bin/arangosh ]; then ARANGOSH="build/bin/arangosh${EXT}" - elif [ -x bin/arangosh ]; then + elif [ -x bin/arangosh -a ! -d bin/arangosh ]; then ARANGOSH="bin/arangosh${EXT}" - elif [ -x arangosh ]; then + elif [ -x arangosh -a ! -d arangosh ]; then ARANGOSH="arangosh${EXT}" - elif [ -x usr/bin/arangosh ]; then + elif [ -x usr/bin/arangosh -a ! -d usr/bin/arangosh ]; then ARANGOSH="usr/bin/arangosh${EXT}" else ARANGOSH="$(find "${EXEC_PATH}" -name "arangosh${EXT}" -perm -001 -type f | head -n 1)"