Fixed info plugin latest version check for Insiders

This commit is contained in:
squidfunk 2023-01-15 13:12:58 +01:00
parent 28669259f0
commit b2611483fa
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
# Check if we're running the latest version # Check if we're running the latest version
_, version = res.headers.get("location").rsplit("/", 1) _, version = res.headers.get("location").rsplit("/", 1)
package = get_distribution("mkdocs-material") package = get_distribution("mkdocs-material")
if package.version != version: if not package.version.startswith(version):
log.error("Please upgrade to the latest version.") log.error("Please upgrade to the latest version.")
self._help_on_versions_and_exit(package.version, version) self._help_on_versions_and_exit(package.version, version)

View File

@ -67,7 +67,7 @@ class InfoPlugin(BasePlugin[InfoPluginConfig]):
# Check if we're running the latest version # Check if we're running the latest version
_, version = res.headers.get("location").rsplit("/", 1) _, version = res.headers.get("location").rsplit("/", 1)
package = get_distribution("mkdocs-material") package = get_distribution("mkdocs-material")
if package.version != version: if not package.version.startswith(version):
log.error("Please upgrade to the latest version.") log.error("Please upgrade to the latest version.")
self._help_on_versions_and_exit(package.version, version) self._help_on_versions_and_exit(package.version, version)