Merge from vscode 0fde6619172c9f04c41f2e816479e432cc974b8b (#5199)

This commit is contained in:
Anthony Dresser
2019-04-24 22:26:02 -07:00
committed by GitHub
parent d63f07d29a
commit 34457880c7
86 changed files with 1254 additions and 702 deletions

View File

@@ -481,7 +481,7 @@ function readWindowsCaCertificates() {
}
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 certs = stdout.split(/(?=-----BEGIN CERTIFICATE-----)/g)
.filter(pem => !!pem.length && !seen[pem] && (seen[pem] = true));