File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ export default class MongoBinaryDownload {
147147 const req : any = https . get ( httpOptions , ( response : any ) => {
148148 this . dlProgress . current = 0 ;
149149 this . dlProgress . length = parseInt ( response . headers [ 'content-length' ] , 10 ) ;
150- this . dlProgress . totalMb = Math . round ( this . dlProgress . length / 1048576 * 10 ) / 10 ;
150+ this . dlProgress . totalMb = Math . round ( ( this . dlProgress . length / 1048576 ) * 10 ) / 10 ;
151151
152152 response . pipe ( fileStream ) ;
153153
@@ -179,8 +179,8 @@ export default class MongoBinaryDownload {
179179 this . dlProgress . lastPrintedAt = now ;
180180
181181 const percentComplete =
182- Math . round ( 100.0 * this . dlProgress . current / this . dlProgress . length * 10 ) / 10 ;
183- const mbComplete = Math . round ( this . dlProgress . current / 1048576 * 10 ) / 10 ;
182+ Math . round ( ( ( 100.0 * this . dlProgress . current ) / this . dlProgress . length ) * 10 ) / 10 ;
183+ const mbComplete = Math . round ( ( this . dlProgress . current / 1048576 ) * 10 ) / 10 ;
184184
185185 const crReturn = this . platform === 'win32' ? '\x1b[0G' : '\r' ;
186186 process . stdout . write (
You can’t perform that action at this time.
0 commit comments