Skip to content

Replace the abandoned filepathx library with doublestar; ensure glob characters in paths do not break globbing#81

Merged
kylekthompson merged 2 commits into
mainfrom
kt/test-filename-including-special-glob-chars
Oct 28, 2024
Merged

Replace the abandoned filepathx library with doublestar; ensure glob characters in paths do not break globbing#81
kylekthompson merged 2 commits into
mainfrom
kt/test-filename-including-special-glob-chars

Conversation

@kylekthompson
Copy link
Copy Markdown
Member

@kylekthompson kylekthompson commented Oct 28, 2024

A bug was reported where Captain was returning an error (Failed to assemble run command: unable to expand filepath glob: syntax error in pattern) given a very simple glob pattern against the test directory: test/**/*_test.rb.

It turns out that the test directory contained a file which had characters in the name that were special to filepath.Glob. The library we were using to support doublestar globs was abandoned and did not properly handle escaping these (there's a PR up for it here: yargevad/filepathx#5).

This PR moves us to https://github.com/bmatcuk/doublestar, a much more popular and maintained library for this.

@kylekthompson kylekthompson self-assigned this Oct 28, 2024
@kylekthompson kylekthompson merged commit 022939f into main Oct 28, 2024
@kylekthompson kylekthompson deleted the kt/test-filename-including-special-glob-chars branch October 28, 2024 20:28
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