Skip to content

Commit 4acfd05

Browse files
authored
installer: fix upgrade support check on scm version (#4126)
1 parent ef8511c commit 4acfd05

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

install-poetry.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,15 @@ def run(self) -> int:
415415

416416
def _is_self_upgrade_supported(x):
417417
mx = self.VERSION_REGEX.match(x)
418+
419+
if mx is None:
420+
# the version is not semver, perhaps scm or file, we assume upgrade is supported
421+
return True
422+
418423
vx = tuple(int(p) for p in mx.groups()[:3]) + (mx.group(5),)
419424
return vx >= (1, 2, 0)
420425

421-
if not _is_self_upgrade_supported(version):
426+
if version and not _is_self_upgrade_supported(version):
422427
self._write(
423428
colorize(
424429
"warning",

0 commit comments

Comments
 (0)