@@ -177,7 +177,7 @@ export class PlatformService implements IPlatformService {
177177 platform = platform . toLowerCase ( ) ;
178178
179179 this . preparePlatform ( platform ) . wait ( ) ;
180- if ( options . emulator ) {
180+ if ( options . emulator ) {
181181 this . deployOnEmulator ( platform ) . wait ( ) ;
182182 } else {
183183 this . deployOnDevice ( platform ) . wait ( ) ;
@@ -291,12 +291,14 @@ export class PlatformService implements IPlatformService {
291291 emulatorServices . checkAvailability ( ) . wait ( ) ;
292292 emulatorServices . checkDependencies ( ) . wait ( ) ;
293293
294- this . buildPlatform ( platform ) . wait ( ) ;
294+ if ( ! options . availableDevices ) {
295+ this . buildPlatform ( platform ) . wait ( ) ;
295296
296- var packageFile = this . getLatestApplicationPackageForEmulator ( platformData ) . wait ( ) . packageName ;
297- this . $logger . out ( "Using " , packageFile ) ;
297+ var packageFile = this . getLatestApplicationPackageForEmulator ( platformData ) . wait ( ) . packageName ;
298+ this . $logger . out ( "Using " , packageFile ) ;
298299
299- var logFilePath = path . join ( platformData . projectRoot , this . $projectData . projectName , "emulator.log" ) ;
300+ var logFilePath = path . join ( platformData . projectRoot , this . $projectData . projectName , "emulator.log" ) ;
301+ }
300302
301303 emulatorServices . startEmulator ( packageFile , { stderrFilePath : logFilePath , stdoutFilePath : logFilePath , appId : this . $projectData . projectId } ) . wait ( ) ;
302304 } ) . future < void > ( ) ( ) ;
0 commit comments