فهرست منبع

python: Set the PATH to /usr/local/bin when searching for a Python

* buildpack-deps:stretch has Python 3.5 installed which is detected
  before our custom Python 2.7 in these scripts. Search only in
  /usr/local/bin
Jamie Hewland 8 سال پیش
والد
کامیت
71b1c6c0c3
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      test/tests/python-hy/container.sh
  2. 1 1
      test/tests/run-python-in-container.sh

+ 1 - 1
test/tests/python-hy/container.sh

@@ -3,7 +3,7 @@ set -e
 
 python=
 for c in pypy3 pypy python3 python; do
-	if command -v "$c" > /dev/null; then
+	if PATH=/usr/local/bin command -v "$c" > /dev/null; then
 		python="$c"
 		break
 	fi

+ 1 - 1
test/tests/run-python-in-container.sh

@@ -6,7 +6,7 @@ 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 command -v "$c" > /dev/null; then
+		if PATH=/usr/local/bin command -v "$c" > /dev/null; then
 			exec "$c" "$@"
 		fi
 	done