diff --git a/index.js b/index.js index 8c07188..80cff2a 100755 --- a/index.js +++ b/index.js @@ -196,9 +196,16 @@ function merge (argv) { 'git', ['merge-file', '-p', argv['%A'], argv['%O'], argv['%B']], { - stdio: [0, 'pipe', 2] + stdio: [0, 'pipe', 2], + maxBuffer: Infinity } ) + + if (ret.error) { + console.error('npm-merge-driver: "git merge-file" fails with:', ret.error) + throw ret.error + } + fs.writeFileSync(argv['%P'], ret.stdout) try { cp.execSync(argv.command, {