Skip to content

Commit 14cb8d0

Browse files
heavygeecursoragent
andcommitted
fix(scripts): live mermaid playwright wrapper runs from repo root
HAPI Bot Minor (PR tiann#741): the wrapper sets cwd to scripts/, but the test:mermaid-lightbox:live npm script lives in the repo-root package.json, so spawning npm there exited before Playwright started. Switch cwd to the repo root and drop the unused WEB_DIR constant. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b884b20 commit 14cb8d0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/dev/mermaid-lightbox-live-playwright.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import { spawnSync } from 'node:child_process'
44
import { dirname, resolve } from 'node:path'
55
import { fileURLToPath } from 'node:url'
66

7-
const WEB_DIR = resolve(dirname(fileURLToPath(import.meta.url)), '../../web')
7+
const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../..')
88
const npmBin = process.env.NPM_BIN ?? 'npm'
99

1010
const result = spawnSync(
1111
npmBin,
1212
['run', 'test:mermaid-lightbox:live'],
1313
{
14-
cwd: resolve(dirname(fileURLToPath(import.meta.url)), '..'),
14+
cwd: REPO_ROOT,
1515
stdio: 'inherit',
1616
env: { ...process.env, PATH: process.env.PATH, HAPI_LIVE: '1' },
1717
},

0 commit comments

Comments
 (0)