diff options
Diffstat (limited to 'mesonbuild/programs.py')
| -rw-r--r-- | mesonbuild/programs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py index 46d00ceca..7f4cec52d 100644 --- a/mesonbuild/programs.py +++ b/mesonbuild/programs.py @@ -122,7 +122,10 @@ class ExternalProgram(mesonlib.HoldableObject): output = o.strip() if not output: output = e.strip() - match = re.search(r'([0-9][0-9\.]+)', output) + + match = re.search(r'([0-9](\.[0-9]+)+)', output) + if not match: + match = re.search(r'([0-9][0-9\.]+)', output) if not match: raise mesonlib.MesonException(f'Could not find a version number in output of {raw_cmd!r}') self.cached_version = match.group(1) |
