mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-09-15 01:04:06 +07:00
Fix add_extension on linux and macOS
This commit is contained in:
@ -96,11 +96,11 @@ add_extension()
|
||||
extension=$1
|
||||
install_command=$2
|
||||
prefix=$3
|
||||
if ! php -m | grep -i -q "$extension" && [ -e "$ext_dir/$extension.so" ]; then
|
||||
if ! php -m | grep -i -q ^"$extension"$ && [ -e "$ext_dir/$extension.so" ]; then
|
||||
echo "$prefix=$extension" >> "$ini_file" && add_log "$tick" "$extension" "Enabled"
|
||||
elif php -m | grep -i -q "$extension"; then
|
||||
elif php -m | grep -i -q ^"$extension"$; then
|
||||
add_log "$tick" "$extension" "Enabled"
|
||||
elif ! php -m | grep -i -q "$extension"; then
|
||||
elif ! php -m | grep -i -q ^"$extension"$; then
|
||||
(
|
||||
eval "$install_command" && \
|
||||
add_log "$tick" "$extension" "Installed and enabled"
|
||||
|
Reference in New Issue
Block a user