Skip to content

Commit 47c4c70

Browse files
Merge pull request #3624 from NativeScript/vladimirov/fix-platform-remove
fix: platform remove command fails with old Android runtime
2 parents 255bd92 + dd40c9d commit 47c4c70

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/commands/remove-platform.ts

+4-8
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ export class RemovePlatformCommand implements ICommand {
33

44
constructor(private $platformService: IPlatformService,
55
private $projectData: IProjectData,
6-
private $errors: IErrors,
7-
private $platformsData: IPlatformsData) {
6+
private $errors: IErrors) {
87
this.$projectData.initializeProjectData();
98
}
109

@@ -17,12 +16,9 @@ export class RemovePlatformCommand implements ICommand {
1716
this.$errors.fail("No platform specified. Please specify a platform to remove");
1817
}
1918

20-
for (const platform of args) {
21-
this.$platformService.validatePlatformInstalled(platform, this.$projectData);
22-
const platformData = this.$platformsData.getPlatformData(platform, this.$projectData);
23-
const platformProjectService = platformData.platformProjectService;
24-
await platformProjectService.validate(this.$projectData);
25-
}
19+
_.each(args, platform => {
20+
this.$platformService.validatePlatform(platform, this.$projectData);
21+
});
2622

2723
return true;
2824
}

0 commit comments

Comments
 (0)