修复部分linux获取发行版错误的问题
Some checks failed
Compile / build (x64, windows-latest) (push) Failing after 10s
Compile / build (x64, ubuntu-latest) (push) Failing after 15s

This commit is contained in:
远野千束 2024-10-06 04:39:04 +08:00
parent ce3a07e350
commit 7cbca85a60

View File

@ -20,7 +20,7 @@ try:
for line in os_release.split("\n"): for line in os_release.split("\n"):
if line.startswith("NAME="): if line.startswith("NAME="):
os_name = line.split("=")[1].replace('"', '') os_name = line.split("=")[1].replace('"', '')
elif line.startswith("VERSION="): elif line.startswith("VERSION_ID="):
os_version = line.split("=")[1].replace('"', '') os_version = line.split("=")[1].replace('"', '')
except FileNotFoundError: except FileNotFoundError:
os_name = platform.system() os_name = platform.system()