Fix removing extensions on Ubuntu SH runners. (#271)

This commit is contained in:
Shivam Mathur 2020-08-12 16:57:58 +05:30
parent c5e0997b44
commit c5d29cf8e3
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -124,6 +124,7 @@ delete_extension() {
sudo sed -i "/$extension/d" "$pecl_file" sudo sed -i "/$extension/d" "$pecl_file"
sudo rm -rf "$scan_dir"/*"$extension"* >/dev/null 2>&1 sudo rm -rf "$scan_dir"/*"$extension"* >/dev/null 2>&1
sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1 sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1
[ "$runner" = "self-hosted" ] && $apt_remove "php-$extension"
} }
# Function to disable and delete extensions. # Function to disable and delete extensions.
@ -397,6 +398,7 @@ old_versions="5.[3-5]"
debconf_fix="DEBIAN_FRONTEND=noninteractive" debconf_fix="DEBIAN_FRONTEND=noninteractive"
github="https://github.com/shivammathur" github="https://github.com/shivammathur"
apt_install="sudo $debconf_fix apt-fast install -y" apt_install="sudo $debconf_fix apt-fast install -y"
apt_remove="sudo $debconf_fix apt-fast remove -y"
tool_path_dir="/usr/local/bin" tool_path_dir="/usr/local/bin"
curl_opts=(-sL) curl_opts=(-sL)
existing_version=$(php-config --version 2>/dev/null | cut -c 1-3) existing_version=$(php-config --version 2>/dev/null | cut -c 1-3)