Skip to content

Commit ffafdc6

Browse files
author
Vladimir Enchev
committed
--avd and --device fixed
1 parent 80af26f commit ffafdc6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/services/platform-service.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -508,12 +508,11 @@ export class PlatformService implements IPlatformService {
508508
}
509509

510510
if (this.$options.device || this.$options.avd) {
511-
if (this.$options.avd) {
512-
this.$options.device = this.$options.avd;
513-
this.$options.avd = undefined;
511+
if (this.$options.device) {
512+
this.$options.avd = this.$options.device;
514513
}
515514

516-
if (devices.indexOf(this.$options.device) !== -1) {
515+
if (devices.indexOf(this.$options.device) !== -1 || devices.indexOf(this.$options.avd) !== -1) {
517516
this.ensurePlatformInstalled(platform).wait();
518517

519518
let packageFile: string, logFilePath: string;
@@ -532,7 +531,7 @@ export class PlatformService implements IPlatformService {
532531

533532
emulatorServices.runApplicationOnEmulator(packageFile, { stderrFilePath: logFilePath, stdoutFilePath: logFilePath, appId: this.$projectData.projectId }).wait();
534533
} else {
535-
this.$errors.fail(`Cannot find device with name: ${this.$options.device}.`);
534+
this.$errors.fail(`Cannot find device with name: ${this.$options.device || this.$options.avd}.`);
536535
}
537536
}
538537
}).future<void>()();

0 commit comments

Comments
 (0)