From c2a765ed5bd003598ef01d6945203b068c687c3f Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 16 Jan 2022 09:24:30 +0530 Subject: [PATCH] Do not disable phar on macOS and Linux --- src/scripts/extensions/add_extensions.sh | 2 +- src/scripts/linux.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/extensions/add_extensions.sh b/src/scripts/extensions/add_extensions.sh index bfb1e117..06105cbb 100644 --- a/src/scripts/extensions/add_extensions.sh +++ b/src/scripts/extensions/add_extensions.sh @@ -94,7 +94,7 @@ disable_extension() { # Function to disable shared extensions. disable_all_shared() { sudo sed -i.orig -E -e "/^(zend_)?extension\s*=/d" "${ini_file[@]}" "$pecl_file" 2>/dev/null || true - sudo find "${ini_dir:-$scan_dir}"/.. -name "*.ini" -not -path "*php.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true + sudo find "${ini_dir:-$scan_dir}"/.. -name "*.ini" -not -path "*php.ini" -not -path "*phar.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true add_log "${tick:?}" "none" "Disabled all shared extensions" } diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index faa974e1..2df296ea 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -29,7 +29,7 @@ disable_extension_helper() { disable_extension_dependents "$extension" fi sudo sed -Ei "/=(.*\/)?\"?$extension(.so)?$/d" "${ini_file[@]}" "$pecl_file" - sudo find "$ini_dir"/.. -name "*$extension.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true + sudo find "$ini_dir"/.. -name "*$extension.ini" -not -path "*phar.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true } # Function to add PDO extension.