We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b88b92 commit 2ac5bd0Copy full SHA for 2ac5bd0
src/commands/android/index.ts
@@ -310,17 +310,21 @@ export class AndroidSetup {
310
return false;
311
}
312
313
- const stdout = execBinarySync(
+ let stdout = execBinarySync(
314
avdLocation,
315
'avdmanager',
316
this.platform,
317
'list avd'
318
);
319
320
if (stdout !== null) {
321
- const workingAvds = stdout.split('---------').filter((avd) => !avd.includes('Error: '));
+ const nonWorkingAvdsIndex = stdout.indexOf('could not be loaded');
322
323
- if (workingAvds.filter((avd) => avd.includes(NIGHTWATCH_AVD)).length) {
+ if (nonWorkingAvdsIndex > -1) {
324
+ stdout = stdout.slice(0, nonWorkingAvdsIndex);
325
+ }
326
+
327
+ if (stdout.includes(NIGHTWATCH_AVD)) {
328
return true;
329
330
0 commit comments