Commit f8e2b51 1 parent d264f0b commit f8e2b51 Copy full SHA for f8e2b51
File tree 2 files changed +2
-27
lines changed
2 files changed +2
-27
lines changed Original file line number Diff line number Diff line change @@ -19,27 +19,6 @@ describe('Install', () => {
19
19
}
20
20
} ) ;
21
21
22
- describe ( '#useStrictSSL' , ( ) => {
23
- afterEach ( ( ) => {
24
- delete process . env [ 'npm_config_strict-ssl' ]
25
- } )
26
- describe ( 'when "strict-ssl" is specified in an NPM configuration' , ( ) => {
27
- it ( 'returns a true' , ( ) => {
28
- process . env [ 'npm_config_strict-ssl' ] = "true"
29
- expect ( useStrictSSL ( ) ) . to . be . true
30
- } )
31
- it ( 'returns a false' , ( ) => {
32
- process . env [ 'npm_config_strict-ssl' ] = "false"
33
- expect ( useStrictSSL ( ) ) . to . be . false
34
- } )
35
- } )
36
- describe ( 'when "strict-ssl" is not specified in any NPM configuration' , ( ) => {
37
- it ( 'returns true' , ( ) => {
38
- expect ( useStrictSSL ( ) ) . to . be . true
39
- } )
40
- } )
41
- } )
42
-
43
22
function createConfig ( ) : Config {
44
23
return require ( './install' ) . createConfig ( ) ;
45
24
}
Original file line number Diff line number Diff line change @@ -144,11 +144,6 @@ const CIs = [
144
144
'WERCKER_ROOT' ,
145
145
] ;
146
146
147
- export function useStrictSSL ( ) : boolean {
148
- const prop = config . read ( ) [ 'strict-ssl' ]
149
- return prop === "true" || prop === undefined || prop === ""
150
- }
151
-
152
147
function downloadFileRetry (
153
148
url : string ,
154
149
filepath : string ,
@@ -164,7 +159,8 @@ function downloadFileRetry(
164
159
headers : {
165
160
'User-Agent' : 'https://github.com/pact-foundation/pact-node' ,
166
161
} ,
167
- strictSSL : useStrictSSL ( )
162
+ strictSSL : config . read ( ) [ 'strict-ssl' ] ,
163
+ ca : config . read ( ) [ 'cafile' ] ,
168
164
} )
169
165
. on ( 'error' , ( e : string ) => reject ( e ) )
170
166
. on (
You can’t perform that action at this time.
0 commit comments