Skip to content

Commit 4d34b84

Browse files
Merge pull request #3910 from NativeScript/vladimirov/fix-platform-add-ios
fix: `tns platform add ios` should not be executed on non-macOS
2 parents 6800d90 + 662f189 commit 4d34b84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/commands/add-platform.ts

+5
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)