Commit 90e8fb2
fix: use bunx instead of npx to read Playwright versions under Bun
`getPlaywrightBrowsers()` hardcoded `npx playwright install --dry-run`. A
Bun-only environment has no `npx` on PATH, so `execSync` throws and the catch
reports `Playwright not installed` on a working install. That is a false
negative rather than a visible error, so it reads as a real misconfiguration.
Pick the package runner from the runtime that is actually executing, via
`process.versions.bun`, the same detection already used by `getRuntimeInfo()`.
`bunx playwright install --dry-run` resolves the local
`node_modules/.bin/playwright` and emits output identical to the `npx` form, so
`parsePlaywrightBrowsers()` is unaffected and Node behaviour is unchanged.
This is the only place CodeceptJS shells out to `npx`; every other occurrence
under `lib/` is documentation text. It removes the need to symlink `npx` to
`bun` in Bun images.
Closes #5713
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent b9a7366 commit 90e8fb2
2 files changed
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | | - | |
| 33 | + | |
27 | 34 | | |
28 | 35 | | |
29 | 36 | | |
| |||
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
88 | | - | |
| 95 | + | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
45 | 71 | | |
46 | 72 | | |
47 | 73 | | |
| |||
0 commit comments