File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -729,15 +729,10 @@ $search: String!
729729
730730 const agent = this . getProxyAgent ( provider ) ;
731731 const ignoreSSLErrors = this . getIgnoreSSLErrors ( provider ) ;
732- let previousRejectUnauthorized ;
732+ const fetchMethod : FetchLike = ignoreSSLErrors === 'force' ? insecureFetch : fetch ;
733733
734734 try {
735- if ( ignoreSSLErrors === 'force' ) {
736- previousRejectUnauthorized = process . env . NODE_TLS_REJECT_UNAUTHORIZED ;
737- process . env . NODE_TLS_REJECT_UNAUTHORIZED = '0' ;
738- }
739-
740- rsp = await fetch ( url , {
735+ rsp = await fetchMethod ( url , {
741736 headers : { authorization : `Bearer ${ token } ` , 'content-type' : 'application/json' } ,
742737 agent : agent as any ,
743738 ...options ,
@@ -750,10 +745,6 @@ $search: String!
750745
751746 throw new ProviderFetchError ( 'GitLab' , rsp ) ;
752747 } finally {
753- if ( ignoreSSLErrors === 'force' ) {
754- process . env . NODE_TLS_REJECT_UNAUTHORIZED = previousRejectUnauthorized ;
755- }
756-
757748 stopwatch ?. stop ( ) ;
758749 }
759750 } catch ( ex ) {
You can’t perform that action at this time.
0 commit comments