mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Fix deleting extensions
This commit is contained in:
parent
6bbaac9c49
commit
4ec398d39a
@ -11,7 +11,7 @@ self_hosted_helper() {
|
|||||||
remove_extension() {
|
remove_extension() {
|
||||||
extension=$1
|
extension=$1
|
||||||
if check_extension "$extension"; then
|
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
|
sudo rm -rf "${scan_dir:?}"/*"$extension"* "${ext_dir:?}"/"$extension".so >/dev/null 2>&1
|
||||||
(! check_extension "$extension" && add_log "${tick:?}" ":$extension" "Removed") ||
|
(! check_extension "$extension" && add_log "${tick:?}" ":$extension" "Removed") ||
|
||||||
add_log "${cross:?}" ":$extension" "Could not remove $extension on PHP ${semver:?}"
|
add_log "${cross:?}" ":$extension" "Could not remove $extension on PHP ${semver:?}"
|
||||||
|
@ -48,8 +48,8 @@ install_packages() {
|
|||||||
# Function to delete extensions.
|
# Function to delete extensions.
|
||||||
delete_extension() {
|
delete_extension() {
|
||||||
extension=$1
|
extension=$1
|
||||||
sudo sed -i "/$extension/d" "${ini_file:?}"
|
sudo sed -Ei "/=(.*\/)?\"?$extension/d" "${ini_file:?}"
|
||||||
sudo sed -i "/$extension/d" "${pecl_file:?}"
|
sudo sed -Ei "/=(.*\/)?\"?$extension/d" "${pecl_file:?}"
|
||||||
sudo rm -rf "${scan_dir:?}"/*"$extension"* "${ext_dir:?}"/"$extension".so >/dev/null 2>&1
|
sudo rm -rf "${scan_dir:?}"/*"$extension"* "${ext_dir:?}"/"$extension".so >/dev/null 2>&1
|
||||||
if [ "${runner:?}" = "self-hosted" ]; then
|
if [ "${runner:?}" = "self-hosted" ]; then
|
||||||
$apt_remove "php-$extension" "php$version-$extension" >/dev/null 2>&1 || true
|
$apt_remove "php-$extension" "php$version-$extension" >/dev/null 2>&1 || true
|
||||||
|
Loading…
Reference in New Issue
Block a user