Skip to content

Commit 8b9629c

Browse files
potetojbrown215
andauthored
[compiler] Fix copyright script (#33003)
Don't try to open directories --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33003). * #33004 * __->__ #33003 * #33002 --------- Co-authored-by: Jordan Brown <[email protected]>
1 parent 3a53356 commit 8b9629c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/scripts/copyright.js

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ if (hasErrors) {
5151
}
5252

5353
function processFile(file) {
54+
if (fs.lstatSync(file).isDirectory()) {
55+
return;
56+
}
5457
let source = fs.readFileSync(file, 'utf8');
5558

5659
if (source.indexOf(META_COPYRIGHT_COMMENT_BLOCK) === 0) {

0 commit comments

Comments
 (0)