Fix to handle wrong pecl versions with hyphen

This commit is contained in:
Shivam Mathur
2021-12-08 04:56:29 +05:30
parent f4d1db5c23
commit a274bd910a
5 changed files with 10 additions and 5 deletions

View File

@ -235,7 +235,7 @@ add_pecl_extension() {
pecl_version=$(get_pecl_version "$extension" "$pecl_version")
fi
ext_version=$(php -r "echo phpversion('$extension');")
if [ "$ext_version" = "$pecl_version" ]; then
if [ "${ext_version/-/}" = "$pecl_version" ]; then
add_log "${tick:?}" "$extension" "Enabled"
else
disable_extension_helper "$extension" >/dev/null 2>&1