Skip to content

Commit 9939141

Browse files
Merge pull request #4693 from NativeScript/vladimirov/fix-emulator-run
fix: unable to start iOS simulator when Android is not setup
2 parents 8e92c4e + 83522a7 commit 9939141

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/common/mobile/mobile-core/devices-service.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ export class DevicesService extends EventEmitter implements Mobile.IDevicesServi
128128
const availableEmulatorsOutput = await this.getEmulatorImages({ platform: options.platform });
129129
const emulators = this.$emulatorHelper.getEmulatorsFromAvailableEmulatorsOutput(availableEmulatorsOutput);
130130
const errors = this.$emulatorHelper.getErrorsFromAvailableEmulatorsOutput(availableEmulatorsOutput);
131-
if (errors.length) {
132-
return errors;
133-
}
134131

135132
let emulator = null;
136133
if (options.imageIdentifier) {
@@ -140,7 +137,8 @@ export class DevicesService extends EventEmitter implements Mobile.IDevicesServi
140137
}
141138

142139
if (!emulator) {
143-
return [`Unable to find emulator with provided options: ${options}`];
140+
const additionalErrors = errors && errors.length ? errors : [];
141+
return [`Unable to find emulator with provided options: ${options}`, ...additionalErrors];
144142
}
145143

146144
// emulator is already running

0 commit comments

Comments
 (0)