Rollup merge of #132694 - ismailarilik:fix/x/fix-a-regex-used-to-find-python-executable, r=jieyouxu
fix(x): fix a regex used to find python executable Isn't the regex `^python[2-3]\.[0-9]\+$` wrong? It doesn't match, for example, with `python2.8`. There should be a plus sign at the end for a match, like `python2.8+`. I think `[0-9]+` is meant here instead of `[0-9]\+`. In that case a string like `python2.8` would match. This wasn't noticed because the script probably find and run the Python executable before this line.
This commit is contained in:
commit
7044cc7447
2
x
2
x
@ -36,7 +36,7 @@ for SEARCH_PYTHON in py python3 python python2; do
|
||||
fi
|
||||
done
|
||||
|
||||
python=$(bash -c "compgen -c python" | grep '^python[2-3]\.[0-9]\+$' | head -n1)
|
||||
python=$(bash -c "compgen -c python" | grep '^python[2-3]\.[0-9]+$' | head -n1)
|
||||
if ! [ "$python" = "" ]; then
|
||||
exec "$python" "$xpy" "$@"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user