Only run pod install if CocoaPods v1.0.0 or greater is installed. (#8790)

* Only run pod install if CocoaPods v1.0.0 or greater is installed.

Avoid issues with older versions of CocoaPods breaking the build. Users who genuinely use older versions of CocoaPods will have to run pod install manually when required.
This commit is contained in:
Jakob Andersen 2017-03-16 11:19:07 +01:00 committed by GitHub
parent 6314a6c091
commit cefcd249ac
2 changed files with 5 additions and 4 deletions

View File

@ -60,7 +60,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow {
}
}
bool get _cocoaPodsInstalledAndMeetsVersionCheck {
bool get cocoaPodsInstalledAndMeetsVersionCheck {
if (!hasCocoaPods)
return false;
try {
@ -178,7 +178,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow {
));
}
}
if (_cocoaPodsInstalledAndMeetsVersionCheck) {
if (cocoaPodsInstalledAndMeetsVersionCheck) {
messages.add(new ValidationMessage('CocoaPods version $cocoaPodsVersionText'));
} else {
if (!hasCocoaPods) {

View File

@ -321,8 +321,9 @@ bool _checkXcodeVersion() {
void _runPodInstall(Directory bundle, String engineDirectory) {
if (fs.file(fs.path.join(bundle.path, 'Podfile')).existsSync()) {
if (!doctor.iosWorkflow.hasCocoaPods) {
printError('Warning: CocoaPods not installed. Not running pod install.');
if (!doctor.iosWorkflow.cocoaPodsInstalledAndMeetsVersionCheck) {
final String minimumVersion = doctor.iosWorkflow.cocoaPodsMinimumVersion;
printError('Warning: CocoaPods version $minimumVersion or greater not installed. Skipping pod install.');
return;
}
try {