Conversation
testInfo.file.split("/") never matches Windows path separators, so every
spec failed with template-not-found; use path.basename. Spawning
pnpm.cmd without a shell now throws EINVAL on current Node
(CVE-2024-27980 hardening); enable shell on win32.
Verified: d1-template.spec.ts and a new template spec pass on Windows
with this change and fail without it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Playwright harness currently cannot run any template spec on Windows, for two reasons:
testInfo.file.split("/")never matches Windows path separators, so every spec fails with "Template not found". Fixed withpath.basename.pnpm.cmdwithout a shell throwsEINVALon current Node versions due to the CVE-2024-27980 hardening. Fixed by enablingshellon win32 only; the spawn arguments are all internally generated (script name and numeric ports).Verified on Windows 11 / Node 24:
d1-template.spec.tsand a new template spec both fail without this change and pass with it. No behaviour change on POSIX platforms: the basename swap is equivalent there, and the shell option remains false.AI assistance was used in diagnosing and drafting this change; I reviewed, ran, and take responsibility for it.