Print a warning when cocoapods specs repo is out of date (#12915)

This commit is contained in:
xster
2017-11-10 12:41:58 -08:00
committed by GitHub
parent 3cbb8750a9
commit e94038154b
2 changed files with 60 additions and 1 deletions

View File

@@ -133,7 +133,20 @@ class CocoaPods {
printStatus(result.stderr, indent: 4);
}
}
if (result.exitCode != 0)
if (result.exitCode != 0) {
_diagnosePodInstallFailure(result);
throwToolExit('Error running pod install');
}
}
void _diagnosePodInstallFailure(ProcessResult result) {
if (result.stdout is String && result.stdout.contains('out-of-date source repos')) {
printError(
"Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.\n"
'To update the CocoaPods specs, run:\n'
' pod repo update\n',
emphasis: true,
);
}
}
}