mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Fix deleting extensions
This commit is contained in:
parent
6bbaac9c49
commit
4ec398d39a
@ -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:?}"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user