Skip to content

Commit c41be4f

Browse files
authored
Merge pull request #20796 from nicolo-ribaudo/fix-license-lint
Ignore directories in lint-licenses task
2 parents 40bd735 + ad91f3a commit c41be4f

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)