feat: warn but not exit if frontend build does not exist

This commit is contained in:
Jun Siang Cheah committed 2024-04-28 16:03:30 +01:00
1 parent f070e8b7f9
commit 6a1d60b1b3
2 files changed
+15 -6

No files matched your search

+5 -1
View File
@@ -168,7 +168,11 @@ except:
STATIC_DIR = str(Path(os.getenv("STATIC_DIR", "./static")).resolve())
shutil.copyfile(f"{FRONTEND_BUILD_DIR}/favicon.png", f"{STATIC_DIR}/favicon.png")
frontend_favicon = f"{FRONTEND_BUILD_DIR}/favicon.png"
if os.path.exists(frontend_favicon):
shutil.copyfile(frontend_favicon, f"{STATIC_DIR}/favicon.png")
else:
logging.warning(f"Frontend favicon not found at {frontend_favicon}")
####################################
# CUSTOM_NAME