mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
use extended regex syntax
... and match on optional minor version for python Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
This commit is contained in:
@@ -46,7 +46,7 @@ for SEARCH_PYTHON in $SEARCH; do
|
||||
fi
|
||||
done
|
||||
|
||||
python=$(bash -c "compgen -c python" | grep '^python[2-3]\.[0-9]+$' | head -n1)
|
||||
python=$(bash -c "compgen -c python" | grep -E '^python[2-3](\.[0-9]+)?$' | head -n1)
|
||||
if ! [ "$python" = "" ]; then
|
||||
exec "$python" "$xpy" "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user