Skip to content

Commit

Permalink
fix: Add maxBuffer to expensive git commands
Browse files Browse the repository at this point in the history
Should be a fix for BetaHuhn#253
  • Loading branch information
sammcj committed Nov 29, 2022
1 parent 27113d1 commit 11c20fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 6 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30134,7 +30134,7 @@ class Git {
core.debug(`Cloning ${ this.repo.fullName } into ${ this.workingDir }`)

return execCmd(
`git clone --depth 1 ${ this.repo.branch !== 'default' ? '--branch "' + this.repo.branch + '"' : '' } ${ this.gitUrl } ${ this.workingDir }`
`git clone --depth 1 ${this.repo.branch !== 'default' ? '--branch "' + this.repo.branch + '"' : ''} ${this.gitUrl} ${this.workingDir}`
)
}

Expand Down Expand Up @@ -30465,7 +30465,7 @@ class Git {
Synced local file(s) with [${ GITHUB_REPOSITORY }](https://github.com/${ GITHUB_REPOSITORY }).

${ PR_BODY }

${ changedFiles }

---
Expand Down Expand Up @@ -30568,6 +30568,7 @@ class Git {

module.exports = Git


/***/ }),

/***/ 8505:
Expand Down Expand Up @@ -30623,7 +30624,8 @@ const execCmd = (command, workingDir, trimResult = true) => {
exec(
command,
{
cwd: workingDir
cwd: workingDir,
maxBuffer: '4x1024x1024'
},
function(error, stdout) {
error ? reject(error) : resolve(
Expand Down Expand Up @@ -30726,6 +30728,7 @@ module.exports = {
arrayEquals
}


/***/ }),

/***/ 561:
Expand Down
2 changes: 1 addition & 1 deletion src/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class Git {
Synced local file(s) with [${ GITHUB_REPOSITORY }](https://github.com/${ GITHUB_REPOSITORY }).
${ PR_BODY }
${ changedFiles }
---
Expand Down
3 changes: 2 additions & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ const execCmd = (command, workingDir, trimResult = true) => {
exec(
command,
{
cwd: workingDir
cwd: workingDir,
maxBuffer: '4x1024x1024'
},
function(error, stdout) {
error ? reject(error) : resolve(
Expand Down

0 comments on commit 11c20fd

Please sign in to comment.