Exit on failing to setup PHP

This commit is contained in:
Shivam Mathur
2020-12-17 04:20:39 +05:30
parent f1c04eb1eb
commit ce02569aea
3 changed files with 20 additions and 6 deletions

View File

@ -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"
}