Tweak regex used to determine PHP version

This commit is contained in:
Lance Edgar 2020-10-17 10:21:20 -05:00
parent a77b1ec100
commit ab822411be

View file

@ -73,7 +73,7 @@ def get_php_version(c):
"""
result = c.sudo('php --version')
if not result.failed:
match = re.match(r'^PHP (\d+\.\d+)\.\d+-', result.stdout)
match = re.match(r'^PHP (\d+\.\d+)\.\d+', result.stdout)
if match:
return float(match.group(1))