@@ -128,7 +128,7 @@ function getNoopStatus(): Status {
128128 } ;
129129}
130130
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 > {
132132 status = status || getNoopStatus ( ) ;
133133
134134 logger . append ( `Downloading package '${ pkg . description } ' ` ) ;
@@ -147,12 +147,12 @@ function downloadPackage(pkg: Package, logger: Logger, status?: Status, proxy?:
147147 } ) . then ( tmpResult => {
148148 pkg . tmpFile = tmpResult ;
149149
150- return downloadFile ( pkg . url , pkg , logger , status )
150+ return downloadFile ( pkg . url , pkg , logger , status , proxy , strictSSL )
151151 . then ( ( ) => logger . appendLine ( ' Done!' ) ) ;
152152 } ) ;
153153}
154154
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 > {
156156 const url = parseUrl ( urlString ) ;
157157
158158 const options : https . RequestOptions = {
@@ -169,7 +169,7 @@ function downloadFile(urlString: string, pkg: Package, logger: Logger, status: S
169169 let request = https . request ( options , response => {
170170 if ( response . statusCode === 301 || response . statusCode === 302 ) {
171171 // 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 ) ) ;
173173 }
174174
175175 if ( response . statusCode != 200 ) {
0 commit comments