Skip to content

Conversation

@ferrandiaz
Copy link
Contributor

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

Notes for the Reviewer

Fix shell argument quoting across CLI commands

Summary

  • Add shared shell quoting utility (src/services/shell.ts)
  • Fix argument quoting in pw-test, buildTestCommand, and package manager
  • Remove duplicated quoting logic

Problem

Shell commands were constructed with inconsistent/incomplete quoting:

  • pw-test only quoted args containing spaces, missing other metacharacters (|, $, ;, *, etc.)
  • buildTestCommand had manual quoting that missed edge cases
  • package-manager had a local unsafeQuoteArg function not shared elsewhere

Solution

Created a shared shell.ts utility with consistent quoting that handles all shell metacharacters. Safe characters (%+,-./:=@_ and alphanumeric) pass through unquoted; everything else gets properly escaped.

@ferrandiaz ferrandiaz requested a review from sorccu January 15, 2026 17:57
@ferrandiaz ferrandiaz changed the title Ferran/fix pw quoting flags fix: shell quoting on playwright flags Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants