Fix activation when `files.excludes` contains braces (#789)
* Fix activation when `files.excludes` contains braces * Fix file exclude when searching for CSS filesmaster
parent
4d0623ede0
commit
53b81ca460
|
@ -644,11 +644,15 @@ export async function activate(context: ExtensionContext) {
|
|||
return
|
||||
}
|
||||
|
||||
let exclude = `{${getExcludePatterns(folder)
|
||||
.flatMap((pattern) => braces.expand(pattern))
|
||||
.join(',')
|
||||
.replace(/{/g, '%7B')
|
||||
.replace(/}/g, '%7D')}}`
|
||||
|
||||
let [configFile] = await Workspace.findFiles(
|
||||
new RelativePattern(folder, `**/${CONFIG_GLOB}`),
|
||||
`{${getExcludePatterns(folder)
|
||||
.flatMap((pattern) => braces.expand(pattern))
|
||||
.join(',')}}`,
|
||||
exclude,
|
||||
1
|
||||
)
|
||||
|
||||
|
@ -657,10 +661,7 @@ export async function activate(context: ExtensionContext) {
|
|||
return
|
||||
}
|
||||
|
||||
let cssFiles = await Workspace.findFiles(
|
||||
new RelativePattern(folder, `**/${CSS_GLOB}`),
|
||||
`{${getExcludePatterns(folder).join(',')}}`
|
||||
)
|
||||
let cssFiles = await Workspace.findFiles(new RelativePattern(folder, `**/${CSS_GLOB}`), exclude)
|
||||
|
||||
for (let cssFile of cssFiles) {
|
||||
if (await fileContainsAtConfig(cssFile)) {
|
||||
|
|
Loading…
Reference in New Issue