Skip to content

Commit

Permalink
Increase maxBuffer to 1MB (#2018)
Browse files Browse the repository at this point in the history
My `graphql.schema.json` grown to 1.5KB, and my schema validation broke. The error I'm getting is: 
`Error: Unable to load file from git: RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded`

Fix is easy: increase buffer size to 1MB (default value was 1KB)
  • Loading branch information
standy committed Sep 10, 2020
1 parent 0833425 commit df6e0ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/loaders/git/src/load-git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const createCommand = ({ ref, path }: Input) => {
export async function loadFromGit(input: Input): Promise<string | never> {
try {
return await new Promise((resolve, reject) => {
exec(createCommand(input), { encoding: 'utf-8' }, (error, stdout) => {
exec(createCommand(input), { encoding: 'utf-8', maxBuffer: 1024 * 1024 * 1024 }, (error, stdout) => {
if (error) {
reject(error);
} else {
Expand Down

0 comments on commit df6e0ae

Please sign in to comment.