Fix deleting extensions

This commit is contained in:
Shivam Mathur 2020-11-25 05:03:02 +05:30
parent 6bbaac9c49
commit 4ec398d39a
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 3 additions and 3 deletions

View File

@ -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:?}"

View File

@ -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