Skip to content

Commit 0f5ae7b

Browse files
Fatme HavaluovaFatme Havaluova
authored andcommitted
Fix validation when specifying version to update
1 parent af2cb31 commit 0f5ae7b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/commands/update-platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class UpdatePlatformCommand implements ICommand {
1717
this.$errors.fail("No platform specified. Please specify platforms to update.");
1818
}
1919

20-
_.each(args, arg => this.$platformService.validatePlatformInstalled(arg));
20+
_.each(args, arg => this.$platformService.validatePlatformInstalled(arg.split("@")[0]));
2121

2222
return true;
2323
}).future<boolean>()();

lib/services/platform-service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ export class PlatformService implements IPlatformService {
310310
this.$errors.fail("No platform specified.")
311311
}
312312

313-
platform = platform.toLowerCase();
313+
var parts = platform.split("@");
314+
platform = parts[0].toLowerCase();
314315

315316
if (!this.isValidPlatform(platform)) {
316317
this.$errors.fail("Invalid platform %s. Valid platforms are %s.", platform, helpers.formatListOfNames(this.$platformsData.platformsNames));

0 commit comments

Comments
 (0)