Simplify our "does this image contain the expected Python" test

This commit is contained in:
Tianon Gravi
2017-11-13 15:40:37 -08:00
parent 6bdfeda81a
commit 0b4ac0a348
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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"