Commit cefcd249 authored by Jakob Andersen's avatar Jakob Andersen Committed by GitHub

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.
parent 6314a6c0
......@@ -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) {
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment