Skip to content

Commit 9c6e2fe

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Call ensurePlatformInstalled from livesync-service
1 parent f80efb9 commit 9c6e2fe

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lib/definitions/platform.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ interface IPlatformService {
1818
getLatestApplicationPackageForDevice(platformData: IPlatformData): IFuture<IApplicationPackage>;
1919
getLatestApplicationPackageForEmulator(platformData: IPlatformData): IFuture<IApplicationPackage>;
2020
copyLastOutput(platform: string, targetPath: string, settings: {isForDevice: boolean}): IFuture<void>;
21+
ensurePlatformInstalled(platform: string): IFuture<void>;
2122
}
2223

2324
interface IPlatformData {

lib/services/platform-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export class PlatformService implements IPlatformService {
402402
}).future<void>()();
403403
}
404404

405-
private ensurePlatformInstalled(platform: string): IFuture<void> {
405+
public ensurePlatformInstalled(platform: string): IFuture<void> {
406406
return (() => {
407407
if(!this.isPlatformInstalled(platform).wait()) {
408408
this.addPlatform(platform).wait();

lib/services/usb-livesync-service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
4444
return (() => {
4545
platform = platform || this.initialize(platform).wait();
4646
let platformLowerCase = platform ? platform.toLowerCase() : null;
47+
48+
this.$platformService.ensurePlatformInstalled(platform).wait();
49+
4750
let platformData = this.$platformsData.getPlatformData(platformLowerCase);
4851

4952
if (platformLowerCase === this.$devicePlatformsConstants.Android.toLowerCase()) {

0 commit comments

Comments
 (0)