From bcc9cc6dbe9f4c1e303ab9157698e7644170baeb Mon Sep 17 00:00:00 2001 From: Maxim Devoir Date: Fri, 6 Dec 2019 04:21:01 -0800 Subject: [PATCH] fix: Consistent max buffer value across Node versions. Before Node v12, `maxBuffer` defaulted to 200kb. Node v12+ defaults to 1024kb. Setting the `maxBuffer` value allows for a more consistent cross-version Node experience. --- bin/github-lint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/github-lint.js b/bin/github-lint.js index d7751f86..42116cec 100755 --- a/bin/github-lint.js +++ b/bin/github-lint.js @@ -9,7 +9,7 @@ const path = require('path') function execFile(command, args) { return new Promise(resolve => { - childProcess.execFile(command, args, (error, stdout, stderr) => { + childProcess.execFile(command, args, {maxBuffer: 1024 ** 2}, (error, stdout, stderr) => { resolve({code: error ? error.code : 0, stdout, stderr}) }) })