From 7b56e4491e7fbf5b491894e34739927220e16e65 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 3 Sep 2020 10:17:43 +0530 Subject: [PATCH] Improving removing extensions for Ubuntu SH runners --- src/scripts/linux.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index d1a638f9..60440a24 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -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.