Skip to content

Commit bff4d63

Browse files
JReinholdCopilot
andcommitted
fix(ci): normalize workspace newlines in playwright resolver
Handle CRLF checkouts on Windows runners before applying the catalog regex so Playwright version resolution succeeds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0db4cfe commit bff4d63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/actions/setup-playwright/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ runs:
1616
const workspaceRoot = process.env.GITHUB_WORKSPACE || process.cwd();
1717
const workspaceFilePath = path.join(workspaceRoot, 'pnpm-workspace.yaml');
1818
const workspaceConfig = fs.readFileSync(workspaceFilePath, 'utf8');
19+
const normalizedWorkspaceConfig = workspaceConfig.replace(/\\r\\n/g, '\\n');
1920
20-
const playwrightVersion = workspaceConfig.match(
21+
const playwrightVersion = normalizedWorkspaceConfig.match(
2122
/(?:^|\\n)catalog:\\n(?: {2}[^\\n]*\\n)*? {2}playwright:\\s*([^#\\s]+)\\s*(?:#.*)?(?:\\n|$)/,
2223
)?.[1];
2324

0 commit comments

Comments
 (0)