mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 05:23:03 +07:00
Fix exit log on self-hosted
This commit is contained in:
parent
7cec1987ac
commit
c09954033f
@ -26,10 +26,6 @@ read_env() {
|
||||
|
||||
# Function to setup environment for self-hosted runners.
|
||||
self_hosted_setup() {
|
||||
if [[ "$version" =~ $old_versions ]]; then
|
||||
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
|
||||
exit 1
|
||||
fi
|
||||
if [[ $(command -v brew) == "" ]]; then
|
||||
step_log "Setup Brew"
|
||||
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash -s >/dev/null 2>&1
|
||||
@ -238,8 +234,13 @@ existing_version=$(php-config --version 2>/dev/null | cut -c 1-3)
|
||||
|
||||
read_env
|
||||
if [ "$runner" = "self-hosted" ]; then
|
||||
if [[ "$version" =~ $old_versions ]]; then
|
||||
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
|
||||
exit 1
|
||||
else
|
||||
self_hosted_setup >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup PHP
|
||||
step_log "Setup PHP"
|
||||
|
@ -34,10 +34,6 @@ update_lists() {
|
||||
|
||||
# Function to setup environment for self-hosted runners.
|
||||
self_hosted_setup() {
|
||||
if [[ "$version" =~ $old_versions ]]; then
|
||||
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
|
||||
exit 1
|
||||
fi
|
||||
echo "Set disable_coredump false" | sudo tee -a /etc/sudo.conf
|
||||
if ! command -v apt-fast >/dev/null; then
|
||||
sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast
|
||||
@ -367,12 +363,18 @@ apt_install="sudo $debconf_fix apt-fast install -y"
|
||||
tool_path_dir="/usr/local/bin"
|
||||
existing_version=$(php-config --version 2>/dev/null | cut -c 1-3)
|
||||
|
||||
# Setup PHP
|
||||
step_log "Setup PHP"
|
||||
read_env
|
||||
if [ "$runner" = "self-hosted" ]; then
|
||||
if [[ "$version" =~ $old_versions ]]; then
|
||||
add_log "$cross" "PHP" "PHP $version is not supported on self-hosted runner"
|
||||
exit 1
|
||||
else
|
||||
self_hosted_setup >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup PHP
|
||||
step_log "Setup PHP"
|
||||
sudo mkdir -p /var/run /run/php
|
||||
if [ "$existing_version" != "$version" ]; then
|
||||
if [ ! -e "/usr/bin/php$version" ]; then
|
||||
|
@ -308,7 +308,7 @@ if($env:RUNNER -eq 'self-hosted') {
|
||||
}
|
||||
if($version -lt 5.6) {
|
||||
Add-Log $cross "PHP" "PHP $version is not supported on self-hosted runner"
|
||||
Start-Sleep 3
|
||||
Start-Sleep 1
|
||||
exit 1
|
||||
}
|
||||
if ((Get-InstalledModule).Name -notcontains 'VcRedist') {
|
||||
|
Loading…
Reference in New Issue
Block a user