mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-08-31 17:49:33 +00:00
Support multi-line script.
This commit is contained in:
@@ -66,7 +66,7 @@ function killEmulator() {
|
||||
yield exec.exec(`${ADB_PATH} -s emulator-5554 emu kill`);
|
||||
}
|
||||
catch (error) {
|
||||
console.log('No emulator running on port 5554');
|
||||
console.log(error.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -76,7 +76,6 @@ exports.killEmulator = killEmulator;
|
||||
*/
|
||||
function waitForDevice() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const adbPath = `${process.env.ANDROID_HOME}/platform-tools/adb`;
|
||||
let booted = false;
|
||||
let attempts = 0;
|
||||
const retryInterval = 2; // retry every 2 seconds
|
||||
@@ -84,7 +83,7 @@ function waitForDevice() {
|
||||
while (!booted) {
|
||||
try {
|
||||
let result = '';
|
||||
yield exec.exec(`${adbPath} shell getprop sys.boot_completed`, [], {
|
||||
yield exec.exec(`${ADB_PATH} shell getprop sys.boot_completed`, [], {
|
||||
listeners: {
|
||||
stdout: (data) => {
|
||||
result += data.toString();
|
||||
|
||||
Reference in New Issue
Block a user