Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: running a folder shouldn't also run folders that share prefix #614

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Feb 18, 2025

Closes microsoft/playwright#34813. When running the foo folder, we were sending foo over the wire instead of foo/. That meant that the foobar/ folder also gets executed, which isn't expected.

The fix is to include the trailing slash in the locations we send to Playwright. Because Playwright interprets /root/project/dir/ as a regular expression, I made it omit the leading slash for absolute directories. That has the same effect, because Playwright's location checker isn't strict.

@Skn0tt Skn0tt requested review from mxschmitt and Copilot February 18, 2025 13:31
@Skn0tt Skn0tt self-assigned this Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/utils.ts:216

  • [nitpick] Consider renaming the variable 'path' to avoid potential confusion with the imported 'path' module, which may improve code clarity.
  const path = location.split(':')[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant