From efa10fe101f61544095a334c3dd5ac4b693c3429 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 30 Nov 2022 08:33:24 +1100 Subject: [PATCH] fix: Add maxBuffer to expensive git commands Should be a fix for #253 --- dist/index.js | 5 +++-- src/git.js | 2 +- src/helpers.js | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2818bb27..28f44f50 100644 --- a/dist/index.js +++ b/dist/index.js @@ -30465,7 +30465,7 @@ class Git { Synced local file(s) with [${ GITHUB_REPOSITORY }](https://github.com/${ GITHUB_REPOSITORY }). ${ PR_BODY } - + ${ changedFiles } --- @@ -30623,7 +30623,8 @@ const execCmd = (command, workingDir, trimResult = true) => { exec( command, { - cwd: workingDir + cwd: workingDir, + maxBuffer: 1024 * 1024 * 4 }, function(error, stdout) { error ? reject(error) : resolve( diff --git a/src/git.js b/src/git.js index 1ef550ac..695ef97e 100644 --- a/src/git.js +++ b/src/git.js @@ -421,7 +421,7 @@ class Git { Synced local file(s) with [${ GITHUB_REPOSITORY }](https://github.com/${ GITHUB_REPOSITORY }). ${ PR_BODY } - + ${ changedFiles } --- diff --git a/src/helpers.js b/src/helpers.js index 7353cc8d..19ee4cb5 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -48,7 +48,8 @@ const execCmd = (command, workingDir, trimResult = true) => { exec( command, { - cwd: workingDir + cwd: workingDir, + maxBuffer: 1024 * 1024 * 4 }, function(error, stdout) { error ? reject(error) : resolve(