mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
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:
parent
6314a6c091
commit
cefcd249ac
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user