From fb10edb76ef54d23acab7fabf2e439a099ec23c9 Mon Sep 17 00:00:00 2001 From: Muhammad Numan Date: Wed, 3 Feb 2021 12:55:55 +0500 Subject: [PATCH] fix: Error: spawnSync git ENOBUFS --- src/makePatch.ts | 1 + src/spawnSafe.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/makePatch.ts b/src/makePatch.ts index 8ebeab17..f44c0459 100644 --- a/src/makePatch.ts +++ b/src/makePatch.ts @@ -158,6 +158,7 @@ export function makePatch({ spawnSafeSync("git", args, { cwd: tmpRepo.name, env: { ...process.env, HOME: tmpRepo.name }, + maxBuffer: 1024 * 1024 * 100, }) // remove nested node_modules just to be safe diff --git a/src/spawnSafe.ts b/src/spawnSafe.ts index 665b10ad..3ea042f7 100644 --- a/src/spawnSafe.ts +++ b/src/spawnSafe.ts @@ -4,6 +4,7 @@ import { SpawnOptions } from "child_process" export interface SpawnSafeOptions extends SpawnOptions { throwOnError?: boolean logStdErrOnError?: boolean + maxBuffer?: number } const defaultOptions: SpawnSafeOptions = {