Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle CocoaPods ffi stderr #102327

Merged
merged 1 commit into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Handle CocoaPods ffi stderr
  • Loading branch information
jmagman committed Apr 21, 2022
commit 7bf09a29390a9ac83a75b76102fbb4a3c492469b
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