diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-01-08 17:24:07 +0100 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-01-08 13:45:40 -0500 |
| commit | 27028bd3b173539fd93eed880ad31a73fc7d1719 (patch) | |
| tree | 2524da6f050a6b08d9f743a8cd3ac1f67a72410f /mesonbuild/programs.py | |
| parent | 5af3d3df0034d7ec3c159cc31f063558d5369df3 (diff) | |
| download | meson-27028bd3b173539fd93eed880ad31a73fc7d1719.tar.gz | |
programs: fix regex to match multi-digit major version
In a3679a64e (programs: favor version numbers with dots, 2025-01-03) we
have changed the regex used to extract version numbers to favor dotted
versions. It was reported though that the regex doesn't match major
version numbers that start with multiple digits correctly. Fix this.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Diffstat (limited to 'mesonbuild/programs.py')
| -rw-r--r-- | mesonbuild/programs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py index 7f4cec52d..d01440cce 100644 --- a/mesonbuild/programs.py +++ b/mesonbuild/programs.py @@ -123,7 +123,7 @@ class ExternalProgram(mesonlib.HoldableObject): 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: |
