Fix _checkPodCondition not handling CocoaPodsStatus.brokenInstall (#51676)
This commit is contained in:
committed by
GitHub
parent
fb953b719f
commit
2c846af1a0
@@ -143,13 +143,14 @@ class CocoaPods {
|
||||
throwToolExit('Podfile missing');
|
||||
}
|
||||
bool podsProcessed = false;
|
||||
if (await _checkPodCondition()) {
|
||||
if (_shouldRunPodInstall(xcodeProject, dependenciesChanged)) {
|
||||
await _runPodInstall(xcodeProject, engineDir);
|
||||
podsProcessed = true;
|
||||
if (_shouldRunPodInstall(xcodeProject, dependenciesChanged)) {
|
||||
if (!await _checkPodCondition()) {
|
||||
throwToolExit('CocoaPods not installed or not in valid state.');
|
||||
}
|
||||
_warnIfPodfileOutOfDate(xcodeProject);
|
||||
await _runPodInstall(xcodeProject, engineDir);
|
||||
podsProcessed = true;
|
||||
}
|
||||
_warnIfPodfileOutOfDate(xcodeProject);
|
||||
return podsProcessed;
|
||||
}
|
||||
|
||||
@@ -166,6 +167,15 @@ class CocoaPods {
|
||||
emphasis: true,
|
||||
);
|
||||
return false;
|
||||
case CocoaPodsStatus.brokenInstall:
|
||||
globals.printError(
|
||||
'Warning: CocoaPods is installed but broken. Skipping pod install.\n'
|
||||
'$brokenCocoaPodsConsequence\n'
|
||||
'To re-install:\n'
|
||||
'$cocoaPodsUpgradeInstructions\n',
|
||||
emphasis: true,
|
||||
);
|
||||
return false;
|
||||
case CocoaPodsStatus.unknownVersion:
|
||||
globals.printError(
|
||||
'Warning: Unknown CocoaPods version installed.\n'
|
||||
@@ -193,7 +203,7 @@ class CocoaPods {
|
||||
emphasis: true,
|
||||
);
|
||||
break;
|
||||
default:
|
||||
case CocoaPodsStatus.recommended:
|
||||
break;
|
||||
}
|
||||
if (!await isCocoaPodsInitialized) {
|
||||
|
||||
Reference in New Issue
Block a user