From 2e1c146eec61aa534890a49d219e55a56da039c0 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Wed, 4 May 2022 13:24:08 -0700 Subject: [PATCH] Update ffi gem installation instructions (#103008) --- packages/flutter_tools/lib/src/macos/cocoapods.dart | 2 +- .../test/general.shard/macos/cocoapods_test.dart | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/macos/cocoapods.dart b/packages/flutter_tools/lib/src/macos/cocoapods.dart index 26365b6a4642..98c4602efd1c 100644 --- a/packages/flutter_tools/lib/src/macos/cocoapods.dart +++ b/packages/flutter_tools/lib/src/macos/cocoapods.dart @@ -371,7 +371,7 @@ class CocoaPods { ).send(); _logger.printError( 'Error: To set up CocoaPods for ARM macOS, run:\n' - ' arch -x86_64 sudo gem install ffi\n', + ' sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc\n', emphasis: true, ); } diff --git a/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart b/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart index 81139a64730c..cfdeadb3df35 100644 --- a/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart +++ b/packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart @@ -536,6 +536,10 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by logger.errorText, contains('set up CocoaPods for ARM macOS'), ); + expect( + logger.errorText, + contains('enable-libffi-alloc'), + ); expect(usage.events, contains(const TestUsageEvent('pod-install-failure', 'arm-ffi'))); }); });