Allow version names like v0.0.1 for the FrontendManager.

This commit is contained in:
comfyanonymous 2024-07-16 11:29:38 -04:00
parent 99458e8aca
commit e1630391d6
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class FrontendManager:
Raises:
argparse.ArgumentTypeError: If the version string is invalid.
"""
VERSION_PATTERN = r"^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(\d+\.\d+\.\d+|latest)$"
VERSION_PATTERN = r"^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(v?\d+\.\d+\.\d+|latest)$"
match_result = re.match(VERSION_PATTERN, value)
if match_result is None:
raise argparse.ArgumentTypeError(f"Invalid version string: {value}")