Environment
- OS Version
- MacOS Ventura 13.4.1 (Apple Silicon)
- Windows 10
- Node.js Version: 22.7.0
- fast-glob: 3.3.2
Actual behavior
On MacOS and Windows, escaping single quotes will cause some globs that otherwise fail (return no results) to succeed, but cause other globs that would otherwise succeed to fail.
Expected behavior
- Either the tests with escaped single quotes should return results, or the tests with unescaped single quotes should return results.
Steps to reproduce
Code sample
For this directory structure:
# Setup
mkdir fourth
touch "fourth/file'sA.md"
touch "fourth/file'sB.md"
mkdir "fifth's"
touch "fifth's/fileA.md"
touch "fifth's/fileB.md"
The following test is picky about single quotes being escaped:
require("fast-glob").sync("fourth/file's{A,B}.md")
// => []
require("fast-glob").sync("fourth/file\\'s{A,B}.md")
// => ["fourth/file'sA.md", "fourth/file'sB.md"]
The following test is picky about single quotes being UN-escaped:
require("fast-glob").sync("fifth's/file*.md")
// => ["fifth's/fileA.md", "fifth's/fileB.md"]
require("fast-glob").sync("fifth\\'s/file*.md")
// => []
The following test fails regardless of whether the quote is escaped or not:
require("fast-glob").sync("fifth's/file{A,B}.md")
// => []
require("fast-glob").sync("fifth\\'s/file{A,B}.md")
// => []
Environment
Actual behavior
On MacOS and Windows, escaping single quotes will cause some globs that otherwise fail (return no results) to succeed, but cause other globs that would otherwise succeed to fail.
Expected behavior
Steps to reproduce
Code sample
For this directory structure:
The following test is picky about single quotes being escaped:
The following test is picky about single quotes being UN-escaped:
The following test fails regardless of whether the quote is escaped or not: