mirror of
https://github.com/clearlinux/official-images.git
synced 2026-09-06 21:51:40 +00:00
Simplify our "does this image contain the expected Python" test
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user