Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(e2e): make the redundant fixture copy non-fatal on Windows
Elian Doranae99964e32e4
diff --git a/apps/server/playwright.config.ts b/apps/server/playwright.config.tsindex b5c9495de3..b081bfb206 100644--- a/apps/server/playwright.config.ts+++ b/apps/server/playwright.config.ts@@ -10,10 +10,16 @@ const baseURL = process.env["BASE_URL"] || `http://127.0.0.1:${port}`;// server finds it as a regular file-backed database. In CI the workflow// handles this, but for local runs we do it here.if (!process.env.TRILIUM_DOCKER) {- cpSync(- join(__dirname, "../../packages/trilium-core/src/test/fixtures/document.db"),- join(__dirname, "spec/db/document.db")- );+ try {+ cpSync(+ join(__dirname, "../../packages/trilium-core/src/test/fixtures/document.db"),+ join(__dirname, "spec/db/document.db")+ );+ } catch (e) {+ // The config is re-evaluated in every worker process; by then the webServer already+ // holds the database open, which makes the (redundant) copy fail on Windows.+ console.warn("Skipping test database copy:", (e as Error).message);+ }}export default createBaseConfig({