Skip to content

Commit 55c369f

Browse files
FatmeFatme
authored andcommitted
Merge pull request #1415 from NativeScript/fatme/fix-hooks
Set this._isInitialized after preparePlatform in order before-prepare hooks to work properly
2 parents d8fc863 + 9bde48e commit 55c369f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/livesync/livesync-service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,14 @@ class LiveSyncService implements ILiveSyncService {
4242
public liveSync(platform: string): IFuture<void> {
4343
return (() => {
4444
platform = this.$liveSyncServiceBase.getPlatform(platform).wait();
45-
this._isInitialized = true;
4645
let platformLowerCase = platform.toLowerCase();
4746

4847
if (!this.$platformService.preparePlatform(platformLowerCase).wait()) {
4948
this.$errors.failWithoutHelp("Verify that listed files are well-formed and try again the operation.");
5049
}
5150

51+
this._isInitialized = true; // If we want before-prepare hooks to work properly, this should be set after preparePlatform function
52+
5253
let platformData = this.$platformsData.getPlatformData(platformLowerCase);
5354
this.ensureAndroidFrameworkVersion(platformData).wait();
5455

0 commit comments

Comments
 (0)