diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index e8f2cdf7..25bf8b61 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -11,7 +11,7 @@ self_hosted_helper() { remove_extension() { extension=$1 if check_extension "$extension"; then - sudo sed -i '' "/$extension/d" "${ini_file:?}" + sudo sed -Ei '' "/=(.*\/)?\"?$extension/d" "${ini_file:?}" sudo rm -rf "${scan_dir:?}"/*"$extension"* "${ext_dir:?}"/"$extension".so >/dev/null 2>&1 (! check_extension "$extension" && add_log "${tick:?}" ":$extension" "Removed") || add_log "${cross:?}" ":$extension" "Could not remove $extension on PHP ${semver:?}" diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index cab30499..4fcd9ca8 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -48,8 +48,8 @@ install_packages() { # Function to delete extensions. delete_extension() { extension=$1 - sudo sed -i "/$extension/d" "${ini_file:?}" - sudo sed -i "/$extension/d" "${pecl_file:?}" + sudo sed -Ei "/=(.*\/)?\"?$extension/d" "${ini_file:?}" + sudo sed -Ei "/=(.*\/)?\"?$extension/d" "${pecl_file:?}" sudo rm -rf "${scan_dir:?}"/*"$extension"* "${ext_dir:?}"/"$extension".so >/dev/null 2>&1 if [ "${runner:?}" = "self-hosted" ]; then $apt_remove "php-$extension" "php$version-$extension" >/dev/null 2>&1 || true