Fix web_version not found

This commit is contained in:
yolain
2024-08-10 22:15:34 +08:00
parent 6cab7a18e3
commit 9e85e3a25c
+3 -1
View File
@@ -72,8 +72,10 @@ if os.path.isfile(config_path):
with open(config_path, 'w') as f:
yaml.dump(data, f)
directory = f"./web_version/v1"
else:
elif "WEB_VERSION" in data:
directory = f"./web_version/{data['WEB_VERSION']}"
else:
directory = f"./web_version/v1"
if not os.path.exists(os.path.join(cwd_path, directory)):
print(f"Web version {data['WEB_VERSION']} not found, using default")
directory = f"./web_version/v1"