diff --git a/test/tests/python-hy/container.sh b/test/tests/python-hy/container.sh index dcf142a0f..5cec5f24e 100644 --- a/test/tests/python-hy/container.sh +++ b/test/tests/python-hy/container.sh @@ -3,8 +3,8 @@ set -e python= for c in pypy3 pypy python3 python; do - if PATH=/usr/local/bin command -v "$c" > /dev/null; then - python="$c" + if [ -x "/usr/local/bin/$c" ]; then + python="/usr/local/bin/$c" break fi done diff --git a/test/tests/run-python-in-container.sh b/test/tests/run-python-in-container.sh index 017add195..5af2bfa72 100755 --- a/test/tests/run-python-in-container.sh +++ b/test/tests/run-python-in-container.sh @@ -6,8 +6,8 @@ runDir="$(dirname "$(readlink -f "$BASH_SOURCE")")" source "$runDir/run-in-container.sh" "$testDir" "$1" sh -ec ' for c in pypy3 pypy python3 python; do - if PATH=/usr/local/bin command -v "$c" > /dev/null; then - exec "$c" "$@" + if [ -x "/usr/local/bin/$c" ]; then + exec "/usr/local/bin/$c" "$@" fi done echo >&2 "error: unable to determine how to run python"