mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Only add platform to the cordova project if it has the SDK installed
This commit is contained in:
@@ -388,11 +388,6 @@ var ensureCordovaPlatforms = function (localPath) {
|
||||
var platformsList = execFileSyncOrThrow(
|
||||
localCordova, ['platform', 'list'], { cwd: cordovaPath, env: buildCordovaEnv() });
|
||||
|
||||
// skip iOS platform if not on darwin
|
||||
if (process.platform !== 'darwin') {
|
||||
platforms = _.difference(platforms, ['ios']);
|
||||
}
|
||||
|
||||
verboseLog('The output of `cordova platforms list`:', platformsList.stdout);
|
||||
|
||||
// eg. ['android 3.5.0', 'ios 3.5.0']
|
||||
@@ -408,8 +403,10 @@ var ensureCordovaPlatforms = function (localPath) {
|
||||
});
|
||||
|
||||
_.each(platforms, function (platform) {
|
||||
if (! _.contains(installedPlatforms, platform) &&
|
||||
_.contains(availablePlatforms, platform)) {
|
||||
if (_.contains(installedPlatforms, platform))
|
||||
return;
|
||||
verboseLog('The platform is not in the Cordova project: ' + platform);
|
||||
if (checkPlatformRequirements(platform).acceptable) {
|
||||
verboseLog('Adding a platform', platform);
|
||||
execFileSyncOrThrow(localCordova, ['platform', 'add', platform],
|
||||
{ cwd: cordovaPath, env: buildCordovaEnv() });
|
||||
|
||||
Reference in New Issue
Block a user