Fix reading extension_dir in PHP 8.4 on macOS

This commit is contained in:
Shivam Mathur 2024-04-21 18:16:08 +05:30
parent 8872c784b0
commit d802457674
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -227,7 +227,7 @@ setup_php() {
status="Updated to"
fi
php_config="$(command -v php-config)"
ext_dir="$(grep 'extension_dir=' "$php_config" | cut -d "'" -f 2)"
ext_dir="$(sed -n "s/.*extension_dir=['\"]\(.*\)['\"].*/\1/p" "$php_config")"
ini_dir="$(php_ini_path)"
scan_dir="$(get_scan_dir)"
ini_file="$ini_dir"/php.ini