Ver a proveniência

Fixes #2048 refs to process outside of env/node

main
Eric Amodio há 2 anos
ascendente
cometimento
31b973ec17
1 ficheiros alterados com 2 adições e 11 eliminações
  1. +2
    -11
      src/plus/gitlab/gitlab.ts

+ 2
- 11
src/plus/gitlab/gitlab.ts Ver ficheiro

@ -729,15 +729,10 @@ $search: String!
const agent = this.getProxyAgent(provider);
const ignoreSSLErrors = this.getIgnoreSSLErrors(provider);
let previousRejectUnauthorized;
const fetchMethod: FetchLike = ignoreSSLErrors === 'force' ? insecureFetch : fetch;
try {
if (ignoreSSLErrors === 'force') {
previousRejectUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED;
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
}
rsp = await fetch(url, {
rsp = await fetchMethod(url, {
headers: { authorization: `Bearer ${token}`, 'content-type': 'application/json' },
agent: agent as any,
...options,
@ -750,10 +745,6 @@ $search: String!
throw new ProviderFetchError('GitLab', rsp);
} finally {
if (ignoreSSLErrors === 'force') {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = previousRejectUnauthorized;
}
stopwatch?.stop();
}
} catch (ex) {

Carregando…
Cancelar
Guardar