File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
scripts/emulator-testing/emulators Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,17 @@ export abstract class Emulator {
7575 const reader = resp . body . getReader ( ) ;
7676 reader . read ( ) . then ( function readChunk ( { done, value } ) : any {
7777 if ( done ) {
78- downloadComplete ( ) ;
78+ console . log ( 'Emulator download is done.' ) ;
79+ writer . close ( err => {
80+ if ( err ) {
81+ downloadFailed (
82+ `Failed to close the downloaded emulator file: ${ err } `
83+ ) ;
84+ }
85+
86+ console . log ( 'Closed downloaded emulator file.' ) ;
87+ downloadComplete ( ) ;
88+ } ) ;
7989 } else {
8090 writer . write ( value ) ;
8191 return reader . read ( ) . then ( readChunk ) ;
@@ -92,7 +102,6 @@ export abstract class Emulator {
92102
93103 downloadPromise . then (
94104 ( ) => {
95- console . log ( 'Download complete' ) ;
96105 // Change emulator binary file permission to 'rwxr-xr-x'.
97106 // The execute permission is required for it to be able to start
98107 // with 'java -jar'.
You can’t perform that action at this time.
0 commit comments