File tree 1 file changed +13
-7
lines changed
scripts/emulator-testing/emulators 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -83,16 +83,22 @@ export abstract class Emulator {
83
83
} ) ;
84
84
}
85
85
) ;
86
- // Copy to cache when the download completes, and resolve
87
- // the promise returned by this method.
86
+
88
87
downloadPromise . then (
89
88
( ) => {
90
89
console . log ( 'Download complete' ) ;
91
- this . binaryPath = filepath ;
92
- if ( this . copyToCache ( ) ) {
93
- console . log ( `Cached emulator at ${ this . cacheBinaryPath } ` ) ;
94
- }
95
- resolve ( ) ;
90
+ // Change emulator binary file permission to 'rwxr-xr-x'.
91
+ // The execute permission is required for it to be able to start
92
+ // with 'java -jar'.
93
+ fs . chmod ( filepath , 0o755 , err => {
94
+ if ( err ) reject ( err ) ;
95
+ console . log ( `Changed emulator file permissions to 'rwxr-xr-x'.` ) ;
96
+ this . binaryPath = filepath ;
97
+ if ( this . copyToCache ( ) ) {
98
+ console . log ( `Cached emulator at ${ this . cacheBinaryPath } ` ) ;
99
+ }
100
+ resolve ( ) ;
101
+ } ) ;
96
102
} ,
97
103
( ) => {
98
104
reject ( ) ;
You can’t perform that action at this time.
0 commit comments