Skip to content

Commit fb10edb

Browse files
committed
fix: Error: spawnSync git ENOBUFS
1 parent 50f73bd commit fb10edb

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/makePatch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export function makePatch({
158158
spawnSafeSync("git", args, {
159159
cwd: tmpRepo.name,
160160
env: { ...process.env, HOME: tmpRepo.name },
161+
maxBuffer: 1024 * 1024 * 100,
161162
})
162163

163164
// remove nested node_modules just to be safe

src/spawnSafe.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { SpawnOptions } from "child_process"
44
export interface SpawnSafeOptions extends SpawnOptions {
55
throwOnError?: boolean
66
logStdErrOnError?: boolean
7+
maxBuffer?: number
78
}
89

910
const defaultOptions: SpawnSafeOptions = {

0 commit comments

Comments
 (0)