@samitouri / QOS-React-2 / commits / 8b9629c810

[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 <jmbrown@meta.com>

lauren committed Apr 23, 2025 at 21:55 UTC 8b9629c8106b55965ac6e4f078110b484b358101
1 file changed +3
compiler/scripts/copyright.js
+3
@@ -51,6 +51,9 @@ if (hasErrors) {
51 }
52
53 function processFile(file) {
54 + if (fs.lstatSync(file).isDirectory()) {
55 + return;
56 + }
57 let source = fs.readFileSync(file, 'utf8');
58
59 if (source.indexOf(META_COPYRIGHT_COMMENT_BLOCK) === 0) {