mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
[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>
This commit is contained in:
@@ -51,6 +51,9 @@ if (hasErrors) {
|
||||
}
|
||||
|
||||
function processFile(file) {
|
||||
if (fs.lstatSync(file).isDirectory()) {
|
||||
return;
|
||||
}
|
||||
let source = fs.readFileSync(file, 'utf8');
|
||||
|
||||
if (source.indexOf(META_COPYRIGHT_COMMENT_BLOCK) === 0) {
|
||||
|
||||
Reference in New Issue
Block a user