mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +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.
|
# Function to setup environment for self-hosted runners.
|
||||||
self_hosted_setup() {
|
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
|
if [[ $(command -v brew) == "" ]]; then
|
||||||
step_log "Setup Brew"
|
step_log "Setup Brew"
|
||||||
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash -s >/dev/null 2>&1
|
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash -s >/dev/null 2>&1
|
||||||
@ -238,7 +234,12 @@ existing_version=$(php-config --version 2>/dev/null | cut -c 1-3)
|
|||||||
|
|
||||||
read_env
|
read_env
|
||||||
if [ "$runner" = "self-hosted" ]; then
|
if [ "$runner" = "self-hosted" ]; then
|
||||||
self_hosted_setup >/dev/null 2>&1
|
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
|
fi
|
||||||
|
|
||||||
# Setup PHP
|
# Setup PHP
|
||||||
|
@ -34,10 +34,6 @@ update_lists() {
|
|||||||
|
|
||||||
# Function to setup environment for self-hosted runners.
|
# Function to setup environment for self-hosted runners.
|
||||||
self_hosted_setup() {
|
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
|
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
|
||||||
@ -367,12 +363,18 @@ apt_install="sudo $debconf_fix apt-fast install -y"
|
|||||||
tool_path_dir="/usr/local/bin"
|
tool_path_dir="/usr/local/bin"
|
||||||
existing_version=$(php-config --version 2>/dev/null | cut -c 1-3)
|
existing_version=$(php-config --version 2>/dev/null | cut -c 1-3)
|
||||||
|
|
||||||
# Setup PHP
|
|
||||||
step_log "Setup PHP"
|
|
||||||
read_env
|
read_env
|
||||||
if [ "$runner" = "self-hosted" ]; then
|
if [ "$runner" = "self-hosted" ]; then
|
||||||
self_hosted_setup >/dev/null 2>&1
|
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
|
fi
|
||||||
|
|
||||||
|
# Setup PHP
|
||||||
|
step_log "Setup PHP"
|
||||||
sudo mkdir -p /var/run /run/php
|
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
|
||||||
|
@ -308,7 +308,7 @@ if($env:RUNNER -eq 'self-hosted') {
|
|||||||
}
|
}
|
||||||
if($version -lt 5.6) {
|
if($version -lt 5.6) {
|
||||||
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"
|
||||||
Start-Sleep 3
|
Start-Sleep 1
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
if ((Get-InstalledModule).Name -notcontains 'VcRedist') {
|
if ((Get-InstalledModule).Name -notcontains 'VcRedist') {
|
||||||
|
Loading…
Reference in New Issue
Block a user