fix: use npx.cmd on Windows for Playwright MCP server

On Windows with Git Bash, 'npx' is not resolved as a command.
Using 'npx.cmd' ensures the MCP server starts correctly,
enabling Playwright browser tools for QA testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
snomiao
2026-03-08 08:04:33 +00:00
parent 0defd1393d
commit bea707005e

View File

@@ -124,8 +124,10 @@ jobs:
- name: Create MCP config
shell: bash
run: |
NPX_CMD="npx"
if [ "$RUNNER_OS" = "Windows" ]; then NPX_CMD="npx.cmd"; fi
cat > "${{ runner.temp }}/mcp-config.json" <<EOF
{"mcpServers":{"playwright":{"command":"npx","args":["@playwright/mcp@0.0.68"]}}}
{"mcpServers":{"playwright":{"command":"${NPX_CMD}","args":["@playwright/mcp@0.0.68"]}}}
EOF
- name: Write QA prompt