mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-08-23 22:14:07 +07:00
Exit on failing to setup PHP
This commit is contained in:
@ -145,6 +145,10 @@ setup_php() {
|
||||
scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||")
|
||||
sudo mkdir -m 777 -p "$ext_dir" "$HOME/.composer"
|
||||
semver=$(php -v | head -n 1 | cut -f 2 -d ' ')
|
||||
if [ ${semver%.*} != "$version" ]; then
|
||||
add_log "$cross" "PHP" "Could not setup PHP $version"
|
||||
exit 1
|
||||
fi
|
||||
sudo cp "$dist"/../src/configs/*.json "$RUNNER_TOOL_CACHE/"
|
||||
add_log "$tick" "PHP" "$status PHP $semver"
|
||||
}
|
||||
|
Reference in New Issue
Block a user