Skip to content

Commit aaf1e2d

Browse files
authored
Unrolled build for rust-lang#132694
Rollup merge of rust-lang#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.
2 parents fe43131 + e0b98c7 commit aaf1e2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: x

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ for SEARCH_PYTHON in py python3 python python2; do
3636
fi
3737
done
3838

39-
python=$(bash -c "compgen -c python" | grep '^python[2-3]\.[0-9]\+$' | head -n1)
39+
python=$(bash -c "compgen -c python" | grep '^python[2-3]\.[0-9]+$' | head -n1)
4040
if ! [ "$python" = "" ]; then
4141
exec "$python" "$xpy" "$@"
4242
fi

0 commit comments

Comments
 (0)