diff --git a/gulpfile.mjs b/gulpfile.mjs index e694e8357..11c0f3b57 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -2083,11 +2083,16 @@ gulp.task("lint-licenses", function (done) { "examples/**/*.html", "!web/wasm/**/*", ], - { - base: ".", - } + { base: "." } ) .on("data", function (file) { + if (!file.contents) { + console.warn( + ` ${file.relative} is a directory, skipping license header check.` + ); + return; + } + const relativePath = file.relative; const content = file.contents.toString(); const re = relativePath.endsWith(".html") ? htmlRE : jsRE;