Skip to content

Commit 487b0a5

Browse files
authored
enhance regex for detection of more version variants
1 parent 82b291d commit 487b0a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builder/penv_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get_packages_to_install(deps, installed_packages):
101101
elif name == "platformio":
102102
# Enforce the version from the direct URL if it looks like one.
103103
# If version can't be parsed, fall back to accepting any installed version.
104-
m = re.search(r'/v?(\d+\.\d+\.\d+(?:\.\d+)?)(?:\.(?:zip|tar\.gz|tar\.bz2))?$', spec)
104+
m = re.search(r'/v?(\d+\.\d+\.\d+(?:[.-]\w+)?(?:\.\d+)?)(?:\.(?:zip|tar\.gz|tar\.bz2))?$', spec)
105105
if m:
106106
expected_ver = pepver_to_semver(m.group(1))
107107
if installed_packages.get(name) != expected_ver:

0 commit comments

Comments
 (0)