Skip to content

Prevent accidental file matching when glob contains trailing slash - #805

Merged
luketomlinson merged 5 commits into
mainfrom
bugfix/glob-file-matching
May 14, 2021
Merged

Prevent accidental file matching when glob contains trailing slash#805
luketomlinson merged 5 commits into
mainfrom
bugfix/glob-file-matching

Conversation

@luketomlinson

@luketomlinson luketomlinson commented May 11, 2021

Copy link
Copy Markdown
Contributor

Resolves #628

Handles an odd case with Minimatch that we worked around before that inadvertently would match files when a trailing slash was added.

Comment thread packages/glob/src/internal-pattern.ts Outdated
Comment thread packages/glob/src/internal-pattern.ts Outdated
Comment thread packages/glob/src/internal-globber.ts Outdated
Comment thread packages/glob/src/internal-pattern.ts Outdated
Comment thread packages/glob/src/internal-globber.ts Outdated
@luketomlinson
luketomlinson marked this pull request as ready for review May 11, 2021 21:11
@luketomlinson
luketomlinson requested a review from a team as a code owner May 11, 2021 21:11
@luketomlinson luketomlinson changed the title Draft Solution Prevent accidental file matching when glob contains trailing slash May 11, 2021
Comment thread packages/glob/src/internal-pattern.ts Outdated

@thboop thboop left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@luketomlinson
luketomlinson merged commit 98549fb into main May 14, 2021
@luketomlinson
luketomlinson deleted the bugfix/glob-file-matching branch May 14, 2021 18:12
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.

glob: Pattern with trailing / unexpectedly matches a file.

4 participants