mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Fix parsing extra version
This commit is contained in:
parent
13760f5b16
commit
31971c78cd
@ -172,8 +172,9 @@ add_php() {
|
|||||||
|
|
||||||
# Function to get extra version.
|
# Function to get extra version.
|
||||||
php_extra_version() {
|
php_extra_version() {
|
||||||
if [[ ${version:?} =~ ${nightly_versions:?} ]]; then
|
php_formula_file="$tap_dir"/shivammathur/homebrew-php/Formula/php@"$version".rb
|
||||||
echo " ($(brew cat "$php_formula" | grep -Eo "archive/[0-9a-zA-Z]+" | cut -d'/' -f 2))"
|
if [ -e "$php_formula_file" ] && grep -Eq "archive/[0-9a-zA-Z]+" "$php_formula_file"; then
|
||||||
|
echo " ($(grep -Eo "archive/[0-9a-zA-Z]+" "$php_formula_file" | cut -d'/' -f 2))"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ link_pecl_file() {
|
|||||||
|
|
||||||
# Function to get extra version.
|
# Function to get extra version.
|
||||||
php_extra_version() {
|
php_extra_version() {
|
||||||
if [[ ${version:?} =~ ${nightly_versions:?} ]]; then
|
if [ -e /etc/php/"$version"/COMMIT ]; then
|
||||||
echo " ($(cat "/etc/php/$version/COMMIT"))"
|
echo " ($(cat "/etc/php/$version/COMMIT"))"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user