Skip to content

Commit ad91f3a

Browse files
Ignore directories in lint-licenses task
The glob pattern will include directories that have a name ending, for example, with `.js`.
1 parent 40bd735 commit ad91f3a

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

gulpfile.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,11 +2083,16 @@ gulp.task("lint-licenses", function (done) {
20832083
"examples/**/*.html",
20842084
"!web/wasm/**/*",
20852085
],
2086-
{
2087-
base: ".",
2088-
}
2086+
{ base: "." }
20892087
)
20902088
.on("data", function (file) {
2089+
if (!file.contents) {
2090+
console.warn(
2091+
` ${file.relative} is a directory, skipping license header check.`
2092+
);
2093+
return;
2094+
}
2095+
20912096
const relativePath = file.relative;
20922097
const content = file.contents.toString();
20932098
const re = relativePath.endsWith(".html") ? htmlRE : jsRE;

0 commit comments

Comments
 (0)