@@ -128,7 +128,7 @@ function getNoopStatus(): Status {
128
128
} ;
129
129
}
130
130
131
- function downloadPackage ( pkg : Package , logger : Logger , status ? : Status , proxy ? : string , strictSSL ? : boolean ) : Promise < void > {
131
+ function downloadPackage ( pkg : Package , logger : Logger , status : Status , proxy : string , strictSSL : boolean ) : Promise < void > {
132
132
status = status || getNoopStatus ( ) ;
133
133
134
134
logger . append ( `Downloading package '${ pkg . description } ' ` ) ;
@@ -147,12 +147,12 @@ function downloadPackage(pkg: Package, logger: Logger, status?: Status, proxy?:
147
147
} ) . then ( tmpResult => {
148
148
pkg . tmpFile = tmpResult ;
149
149
150
- return downloadFile ( pkg . url , pkg , logger , status )
150
+ return downloadFile ( pkg . url , pkg , logger , status , proxy , strictSSL )
151
151
. then ( ( ) => logger . appendLine ( ' Done!' ) ) ;
152
152
} ) ;
153
153
}
154
154
155
- function downloadFile ( urlString : string , pkg : Package , logger : Logger , status : Status , proxy ? : string , strictSSL ? : boolean ) : Promise < void > {
155
+ function downloadFile ( urlString : string , pkg : Package , logger : Logger , status : Status , proxy : string , strictSSL : boolean ) : Promise < void > {
156
156
const url = parseUrl ( urlString ) ;
157
157
158
158
const options : https . RequestOptions = {
@@ -169,7 +169,7 @@ function downloadFile(urlString: string, pkg: Package, logger: Logger, status: S
169
169
let request = https . request ( options , response => {
170
170
if ( response . statusCode === 301 || response . statusCode === 302 ) {
171
171
// Redirect - download from new location
172
- return resolve ( downloadFile ( response . headers . location , pkg , logger , status ) ) ;
172
+ return resolve ( downloadFile ( response . headers . location , pkg , logger , status , proxy , strictSSL ) ) ;
173
173
}
174
174
175
175
if ( response . statusCode != 200 ) {
0 commit comments