Skip to content

Commit 662f189

Browse files
fix: tns platform add ios should not be executed on non-macOS
`tns platform add ios` should not be executed on non-macOS system. Currently in the master branch it exits silently, add correct error, so the user will know that it is not okay.
1 parent 2abae5f commit 662f189

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/commands/add-platform.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ export class AddPlatformCommand extends ValidatePlatformCommandBase implements I
2424
let canExecute = true;
2525
for (const arg of args) {
2626
this.$platformService.validatePlatform(arg, this.$projectData);
27+
28+
if (!this.$platformService.isPlatformSupportedForOS(arg, this.$projectData)) {
29+
this.$errors.fail(`Applications for platform ${arg} can not be built on this OS`);
30+
}
31+
2732
const output = await super.canExecuteCommandBase(arg);
2833
canExecute = canExecute && output.canExecute;
2934
}

0 commit comments

Comments
 (0)