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

@ -267,6 +267,10 @@ setup_php() {
status="Found"
fi
fi
if ! command -v php"$version" >/dev/null; then
add_log "$cross" "PHP" "Could not setup PHP $version"
exit 1
fi
semver=$(php_semver)
ext_dir=$(php -i | grep "extension_dir => /" | sed -e "s|.*=> s*||")
scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||")