Skip to content

Commit

Permalink
Work around minifier bug (#79044)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Aug 13, 2019
1 parent d841937 commit 6371cad
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/vs/workbench/services/extensions/node/proxyResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,24 +469,26 @@ async function readCaCertificates() {
}

async function readWindowsCaCertificates() {
const winCA = await import('vscode-windows-ca-certs');

let ders: any[] = [];
const store = winCA();
try {
let der: any;
while (der = store.next()) {
ders.push(der);
}
} finally {
store.done();
}
// Not using await to work around minifier bug (https://github.com/microsoft/vscode/issues/79044).
return import('vscode-windows-ca-certs')
.then(winCA => {
let ders: any[] = [];
const store = winCA();
try {
let der: any;
while (der = store.next()) {
ders.push(der);
}
} finally {
store.done();
}

const certs = new Set(ders.map(derToPem));
return {
certs: Array.from(certs),
append: true
};
const certs = new Set(ders.map(derToPem));
return {
certs: Array.from(certs),
append: true
};
});
}

async function readMacCaCertificates() {
Expand Down

0 comments on commit 6371cad

Please sign in to comment.