Fix Playwright MCP config path quoting - #187
Merged
Merged
Conversation
Quote the Power Pages Playwright MCP config path before passing it through the shell so plugin install paths with spaces are preserved as a single argument. Add regression coverage for Windows-style paths with spaces. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Priyanshu Agrawal (priyanshu92)
June 10, 2026 16:30
View session
Priyanshu Agrawal (priyanshu92)
enabled auto-merge (squash)
June 10, 2026 16:32
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Power Pages’ Playwright MCP launcher failing when the plugin install path contains spaces by shell-quoting the generated --config path before invoking npx with shell: true, and adds regression tests for Windows paths with spaces.
Changes:
- Introduces
quoteShellArg()and applies it to the--configargument in the Power Pages Playwright MCP launcher. - Extends
buildMcpArgs()to allow injectingconfigPath/platformfor testing. - Adds a Windows regression test covering config paths with spaces.
Show a summary per file
| File | Description |
|---|---|
| plugins/power-pages/scripts/launch-playwright-mcp.js | Adds shell-argument quoting for the config path (with Windows handling) and exports the helper for testing. |
| plugins/power-pages/scripts/tests/launch-playwright-mcp.test.js | Updates/extends tests to validate quoting behavior, including a Windows path-with-spaces regression case. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
Address review comment on launch Playwright MCP config path assertions by comparing the generated --config argument to a directly computed expected path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ashish Choudhary (ashishchoudhary001)
approved these changes
Jun 10, 2026
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 Power Pages Playwright MCP launcher passes its config path through
shell: true, so plugin install paths containing spaces can be split by the shell before reaching@playwright/mcp. This change quotes the generated config path before it is passed tonpx, preserving it as one argument.Changes
cmd.exehandling.Validation
node --test plugins/power-pages/scripts/tests/launch-playwright-mcp.test.jsnode --test plugins/power-pages/scripts/tests/Fixes #186