@@ -121,7 +121,7 @@ export default class MongoBinaryDownload {
121121 return undefined ;
122122 }
123123 const mongoDBArchiveMd5 = await this . download ( urlForReferenceMD5 ) ;
124- const signatureContent = fs . readFileSync ( mongoDBArchiveMd5 ) . toString ( 'UTF -8' ) ;
124+ const signatureContent = fs . readFileSync ( mongoDBArchiveMd5 ) . toString ( 'utf -8' ) ;
125125 const m = signatureContent . match ( / ( .* ?) \s / ) ;
126126 const md5Remote = m ? m [ 1 ] : null ;
127127 const md5Local = md5File . sync ( mongoDBArchive ) ;
@@ -208,15 +208,17 @@ export default class MongoBinaryDownload {
208208 await this . extractZip ( mongoDBArchive , extractDir , filter ) ;
209209 } else {
210210 throw new Error (
211- `MongoBinaryDownload: unsupported archive ${ mongoDBArchive } (downloaded from ${ this
212- . _downloadingUrl ?? 'unkown' } ). Broken archive from MongoDB Provider?`
211+ `MongoBinaryDownload: unsupported archive ${ mongoDBArchive } (downloaded from ${
212+ this . _downloadingUrl ?? 'unkown'
213+ } ). Broken archive from MongoDB Provider?`
213214 ) ;
214215 }
215216
216217 if ( ! ( await this . locationExists ( path . resolve ( this . downloadDir , this . version , binaryName ) ) ) ) {
217218 throw new Error (
218- `MongoBinaryDownload: missing mongod binary in ${ mongoDBArchive } (downloaded from ${ this
219- . _downloadingUrl ?? 'unkown' } ). Broken archive from MongoDB Provider?`
219+ `MongoBinaryDownload: missing mongod binary in ${ mongoDBArchive } (downloaded from ${
220+ this . _downloadingUrl ?? 'unkown'
221+ } ). Broken archive from MongoDB Provider?`
220222 ) ;
221223 }
222224 return extractDir ;
@@ -314,7 +316,8 @@ export default class MongoBinaryDownload {
314316 const fileStream = fs . createWriteStream ( tempDownloadLocation ) ;
315317
316318 https
317- . get ( httpOptions , ( response ) => {
319+ . get ( httpOptions as any , ( response ) => {
320+ // "as any" because otherwise the "agent" wouldnt match
318321 if ( response . statusCode != 200 ) {
319322 if ( response . statusCode === 403 ) {
320323 reject (
@@ -376,7 +379,7 @@ export default class MongoBinaryDownload {
376379 * Print the Download Progress to STDOUT
377380 * @param chunk A chunk to get the length
378381 */
379- printDownloadProgress ( chunk : any ) : void {
382+ printDownloadProgress ( chunk : { length : number } ) : void {
380383 this . dlProgress . current += chunk . length ;
381384
382385 const now = Date . now ( ) ;
0 commit comments