mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Increase max buffer for readMacCaCertificates
Node 12 increases this limit to 1mb Longer term fix would be to use spawn instead of exec
This commit is contained in:
parent
6164a77e36
commit
a8fe4ffee6
|
@ -481,7 +481,7 @@ function readWindowsCaCertificates() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function readMacCaCertificates() {
|
async function readMacCaCertificates() {
|
||||||
const stdout = (await promisify(cp.execFile)('/usr/bin/security', ['find-certificate', '-a', '-p'], { encoding: 'utf8' })).stdout;
|
const stdout = (await promisify(cp.execFile)('/usr/bin/security', ['find-certificate', '-a', '-p'], { encoding: 'utf8', maxBuffer: 1024 * 1024 })).stdout;
|
||||||
const seen = {};
|
const seen = {};
|
||||||
const certs = stdout.split(/(?=-----BEGIN CERTIFICATE-----)/g)
|
const certs = stdout.split(/(?=-----BEGIN CERTIFICATE-----)/g)
|
||||||
.filter(pem => !!pem.length && !seen[pem] && (seen[pem] = true));
|
.filter(pem => !!pem.length && !seen[pem] && (seen[pem] = true));
|
||||||
|
|
Loading…
Reference in a new issue