Unverified Commit c9825d24 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Handle CocoaPods ffi stderr (#102327)

parent c73100bf
...@@ -349,10 +349,11 @@ class CocoaPods { ...@@ -349,10 +349,11 @@ class CocoaPods {
} }
void _diagnosePodInstallFailure(ProcessResult result) { void _diagnosePodInstallFailure(ProcessResult result) {
if (result.stdout is! String) { final Object? stdout = result.stdout;
final Object? stderr = result.stderr;
if (stdout is! String || stderr is! String) {
return; return;
} }
final String stdout = result.stdout as String;
if (stdout.contains('out-of-date source repos')) { if (stdout.contains('out-of-date source repos')) {
_logger.printError( _logger.printError(
"Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.\n" "Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.\n"
...@@ -360,7 +361,7 @@ class CocoaPods { ...@@ -360,7 +361,7 @@ class CocoaPods {
' pod repo update\n', ' pod repo update\n',
emphasis: true, emphasis: true,
); );
} else if ((stdout.contains('ffi_c.bundle') || stdout.contains('/ffi/')) && } else if ((stderr.contains('ffi_c.bundle') || stderr.contains('/ffi/')) &&
_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) { _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) {
// https://github.com/flutter/flutter/issues/70796 // https://github.com/flutter/flutter/issues/70796
UsageEvent( UsageEvent(
......
...@@ -514,7 +514,7 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by ...@@ -514,7 +514,7 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
'LANG': 'en_US.UTF-8', 'LANG': 'en_US.UTF-8',
}, },
exitCode: 1, exitCode: 1,
stdout: cocoaPodsError, stderr: cocoaPodsError,
), ),
const FakeCommand( const FakeCommand(
command: <String>['which', 'sysctl'], command: <String>['which', 'sysctl'],
......
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