Merge pull request #925 from thsrite/main

This commit is contained in:
jxxghp 2023-10-20 09:58:16 +08:00 committed by GitHub
commit 7ffc5e6624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,12 +106,12 @@ class SystemChain(ChainBase, metaclass=Singleton):
try:
with open(version_file, 'rb') as f:
version = f.read()
pattern = r"v(\d+\.\d+\.\d+)"
pattern = r"'([^']*)'"
match = re.search(pattern, str(version))
if match:
version = match.group(1)
return f"v{version}"
return version
else:
logger.warn("未找到版本号")
return None