From 528a229daac30c480546700cbe0899372281ccb9 Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Tue, 1 Jun 2021 17:09:07 +0200 Subject: [PATCH] installer: fix upgrade support check on scm version --- install-poetry.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install-poetry.py b/install-poetry.py index 22e1ee7a263..e11bed1f1ba 100644 --- a/install-poetry.py +++ b/install-poetry.py @@ -415,10 +415,15 @@ def run(self) -> int: def _is_self_upgrade_supported(x): mx = self.VERSION_REGEX.match(x) + + if mx is None: + # the version is not semver, perhaps scm or file, we assume upgrade is supported + return True + vx = tuple(int(p) for p in mx.groups()[:3]) + (mx.group(5),) return vx >= (1, 2, 0) - if not _is_self_upgrade_supported(version): + if version and not _is_self_upgrade_supported(version): self._write( colorize( "warning",