Improving removing extensions for Ubuntu SH runners

This commit is contained in:
Shivam Mathur 2020-09-03 10:17:43 +05:30
parent acc1fdb337
commit 7b56e4491e
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -125,7 +125,10 @@ delete_extension() {
sudo sed -i "/$extension/d" "$pecl_file"
sudo rm -rf "$scan_dir"/*"$extension"* >/dev/null 2>&1
sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1
[ "$runner" = "self-hosted" ] && $apt_remove "php-$extension"
if [ "$runner" = "self-hosted" ]; then
$apt_remove "php-$extension" >/dev/null 2>&1 || true
$apt_remove "php$version-$extension" >/dev/null 2>&1 || true
fi
}
# Function to disable and delete extensions.