Skip to content

Commit c4df643

Browse files
filipesilvavikerman
authored andcommitted
build: increase buffer size for DO_NOT_SUBMIT git diff
1 parent e8dff57 commit c4df643

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/validate-do-not-submit.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ export default async function (argv: ValidateCommitsOptions, logger: logging.Log
5050
let errorCount = 0;
5151

5252
for (const fileName of files) {
53-
const diff = execSync(`git diff "${baseSha}..${sha}" -- "${fileName}"`).toString().trim();
53+
const diff = execSync(`git diff "${baseSha}..${sha}" -- "${fileName}"`, {
54+
// Increase the default buffer size by 100. Diffs can be quite large.
55+
maxBuffer: 100 * 1024 * 1024,
56+
}).toString().trim();
5457

5558
// This does not trigger itself because of the `b` in `\bDO_`...
5659
if (diff.match(/\bDO_NOT_SUBMIT\b/)) {

0 commit comments

Comments
 (0)