mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix parsing 8.1 version
This commit is contained in:
parent
e06e40278f
commit
da9dadf09c
@ -357,7 +357,7 @@ add_composertool() {
|
||||
|
||||
# Function to get PHP version in semver format.
|
||||
php_semver() {
|
||||
php -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z]+([0-9]+)?)?" | head -n 1
|
||||
php -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+((-?[a-zA-Z]+([0-9]+)?)?){2}" | head -n 1
|
||||
}
|
||||
|
||||
# Function to get the tag for a php version.
|
||||
|
@ -207,6 +207,7 @@ setup_php() {
|
||||
scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||")
|
||||
ini_dir=$(php --ini | grep "(php.ini)" | sed -e "s|.*: s*||")
|
||||
pecl_file="$scan_dir"/99-pecl.ini
|
||||
export ext_dir
|
||||
mapfile -t ini_file < <(sudo find "$ini_dir/.." -name "php.ini" -exec readlink -m {} +)
|
||||
link_pecl_file
|
||||
configure_php
|
||||
|
Loading…
Reference in New Issue
Block a user