From 0ba8cf0b2789bca08e8a2de99c39fe49ce6e4792 Mon Sep 17 00:00:00 2001 From: Joran Dirk Greef Date: Wed, 10 Jan 2018 15:26:24 +0200 Subject: [PATCH] Linux: Increase maxBuffer limit to 128 MiB --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 5dca4d3..c74ecc6 100644 --- a/index.js +++ b/index.js @@ -22,7 +22,7 @@ function Attempt(instance, end) { command.push('--'); command.push(instance.command); command = command.join(' '); - Node.child.exec(command, + Node.child.exec(command, { maxBuffer: MAX_BUFFER }, function(error, stdout, stderr) { if (/sudo: /i.test(stderr)) { if (platform === 'linux') { @@ -125,7 +125,7 @@ function Linux(instance, end) { } command.push(instance.command); command = command.join(' '); - Node.child.exec(command, + Node.child.exec(command, { maxBuffer: MAX_BUFFER }, function(error, stdout, stderr) { if (error) { if (/No authentication agent found/.test(stderr)) { @@ -602,3 +602,6 @@ var APPLET = 'UEsDBAoAAAAAAO1YcEcAAAAAAAAAAAAAAAAJABwAQ29udGVudHMvVVQJAAPNnElWLZ var PERMISSION_DENIED = 'User did not grant permission.'; var NO_POLKIT_AGENT = 'No polkit authentication agent found.'; + +// See issue 66: +var MAX_BUFFER = 134217728;