Improve globSync call

This commit is contained in:
Michael B. Gale
2026-10-22 14:57:07 +01:00
parent 5a546846a4
commit 7a0df8fe5b

View File

@@ -99,7 +99,10 @@ if (sarifPath === undefined) {
}
if (fs.statSync(sarifPath).isDirectory()) {
const sarifFiles = globSync(path.join(sarifPath, "**", "*.sarif"));
const sarifFiles = globSync("**/*.sarif", {
cwd: path.resolve(sarifPath),
absolute: true,
});
if (sarifFiles.length < 1) {
throw new Error(`Unable to find any .sarif files in '${sarifPath}'.`);