Skip to content

Commit 093f158

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Show correct warning if the plugin does not support the currently installed platform.
1 parent af86682 commit 093f158

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

lib/services/plugins-service.ts

+16-15
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,23 @@ export class PluginsService implements IPluginsService {
7474

7575
let action = (pluginDestinationPath: string, platform: string, platformData: IPlatformData) => {
7676
return (() => {
77-
if(this.$fs.exists(path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME)).wait()) {
78-
// Process .js files
79-
let installedFrameworkVersion = this.getInstalledFrameworkVersion(platform).wait();
80-
let pluginPlatformsData = pluginData.platformsData;
81-
if(pluginPlatformsData) {
82-
let pluginVersion = (<any>pluginPlatformsData)[platform];
83-
if(!pluginVersion) {
84-
this.$logger.warn(`${pluginData.name} is not supported for ${platform}.`);
85-
return;
86-
}
87-
88-
if(semver.gt(pluginVersion, installedFrameworkVersion)) {
89-
this.$logger.warn(`${pluginData.name} ${pluginVersion} for ${platform} is not compatible with the currently installed framework version ${installedFrameworkVersion}.`);
90-
return;
91-
}
77+
// Process .js files
78+
let installedFrameworkVersion = this.getInstalledFrameworkVersion(platform).wait();
79+
let pluginPlatformsData = pluginData.platformsData;
80+
if(pluginPlatformsData) {
81+
let pluginVersion = (<any>pluginPlatformsData)[platform];
82+
if(!pluginVersion) {
83+
this.$logger.warn(`${pluginData.name} is not supported for ${platform}.`);
84+
return;
85+
}
86+
87+
if(semver.gt(pluginVersion, installedFrameworkVersion)) {
88+
this.$logger.warn(`${pluginData.name} ${pluginVersion} for ${platform} is not compatible with the currently installed framework version ${installedFrameworkVersion}.`);
89+
return;
9290
}
91+
}
92+
93+
if(this.$fs.exists(path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME)).wait()) {
9394

9495
this.$fs.ensureDirectoryExists(pluginDestinationPath).wait();
9596
shelljs.cp("-Rf", pluginData.fullPath, pluginDestinationPath);

0 commit comments

Comments
 (0)