summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-07-28 12:22:31 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-02 04:16:16 -0400
commit3e93a3708ae2d5f58ce68b30323bb8d76b2fc0e9 (patch)
tree60ed6593d291c03f8388b9dfaecf819eb7aafac9
parent901c79d8de49dee9562845e846e9aa3665acd6c4 (diff)
downloadhaskell-3e93a3708ae2d5f58ce68b30323bb8d76b2fc0e9.tar.gz
validate: Look for python3 executable in python detection
Previously we would only look for a `python` executable, but in general we should prefer `python3` and sometimes `python` doesn't exist.
-rwxr-xr-xvalidate10
1 files changed, 6 insertions, 4 deletions
diff --git a/validate b/validate
index ea4ab1b603..6bb3399316 100755
--- a/validate
+++ b/validate
@@ -378,11 +378,13 @@ fi
# We need to be quite picky on Windows about which Python interpreter we use
# (#12554, #12661). Allow the user to override it.
-if [ "z$PYTHON" != "z" ]; then
- PYTHON_ARG="PYTHONPATH=$PYTHON"
-else
- PYTHON_ARG="PYTHONPATH=$(which python)"
+if [ "z$PYTHON" == "z" ]; then
+ PYTHON="$(which python3)"
+fi
+if [ "z$PYTHON" == "z" ]; then
+ PYTHON="$(which python)"
fi
+PYTHON_ARG="PYTHONPATH=$PYTHON"
if [ "$ignore_perf_all" = "YES" ]; then
test_perf_args="runtest.opts +=--ignore-perf-failures=all"