Skip to content

Commit

Permalink
Handle CocoaPods ffi stderr (#102327)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmagman authored Apr 21, 2022
1 parent c73100b commit c9825d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/flutter_tools/lib/src/macos/cocoapods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,19 @@ class CocoaPods {
}

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;
}
final String stdout = result.stdout as String;
if (stdout.contains('out-of-date source repos')) {
_logger.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,
);
} 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) {
// https://github.com/flutter/flutter/issues/70796
UsageEvent(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
exitCode: 1,
stdout: cocoaPodsError,
stderr: cocoaPodsError,
),
const FakeCommand(
command: <String>['which', 'sysctl'],
Expand Down

0 comments on commit c9825d2

Please sign in to comment.