mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-23 04:11:06 +07:00
Move WA for sudo to self_hosted_setup in linux.sh
This commit is contained in:
parent
6bd872ad2c
commit
b2edfc47dd
@ -38,6 +38,7 @@ self_hosted_setup() {
|
|||||||
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
|
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "Set disable_coredump false" | sudo tee -a /etc/sudo.conf
|
||||||
if ! command -v apt-fast >/dev/null; then
|
if ! command -v apt-fast >/dev/null; then
|
||||||
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
||||||
fi
|
fi
|
||||||
@ -45,7 +46,7 @@ self_hosted_setup() {
|
|||||||
if ! apt-cache policy | grep -q ondrej/php; then
|
if ! apt-cache policy | grep -q ondrej/php; then
|
||||||
LC_ALL=C.UTF-8 sudo apt-add-repository ppa:ondrej/php -y
|
LC_ALL=C.UTF-8 sudo apt-add-repository ppa:ondrej/php -y
|
||||||
if [ "$(lsb_release -r -s)" = "16.04" ]; then
|
if [ "$(lsb_release -r -s)" = "16.04" ]; then
|
||||||
sudo "$debconf_fix" apt-get update >/dev/null 2>&1
|
sudo "$debconf_fix" apt-get update
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -365,13 +366,11 @@ existing_version=$(php-config --version 2>/dev/null | cut -c 1-3)
|
|||||||
|
|
||||||
# Setup PHP
|
# Setup PHP
|
||||||
step_log "Setup PHP"
|
step_log "Setup PHP"
|
||||||
echo "Set disable_coredump false" | sudo tee -a /etc/sudo.conf >/dev/null 2>&1
|
|
||||||
sudo mkdir -p /var/run /run/php
|
|
||||||
read_env
|
read_env
|
||||||
if [ "$runner" = "self-hosted" ]; then
|
if [ "$runner" = "self-hosted" ]; then
|
||||||
self_hosted_setup >/dev/null 2>&1
|
self_hosted_setup >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
sudo mkdir -p /var/run /run/php
|
||||||
if [ "$existing_version" != "$version" ]; then
|
if [ "$existing_version" != "$version" ]; then
|
||||||
if [ ! -e "/usr/bin/php$version" ]; then
|
if [ ! -e "/usr/bin/php$version" ]; then
|
||||||
add_php >/dev/null 2>&1
|
add_php >/dev/null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user