diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 2e3661faeb..a50c5fc9da 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -434,16 +434,15 @@ Future _runPodInstall(Directory bundle, String engineDirectory) async { ); return; } - try { - final Status status = logger.startProgress('Running pod install...', expectSlowOperation: true); - await runCheckedAsync( - ['pod', 'install'], - workingDirectory: bundle.path, - environment: {'FLUTTER_FRAMEWORK_DIR': engineDirectory}, - ); - status.stop(); - } catch (e) { - throwToolExit('Error running pod install: $e'); + final Status status = logger.startProgress('Running pod install...', expectSlowOperation: true); + final ProcessResult result = await processManager.run( + ['pod', 'install'], + workingDirectory: bundle.path, + environment: {'FLUTTER_FRAMEWORK_DIR': engineDirectory}, + ); + status.stop(); + if (result.exitCode != 0) { + throwToolExit('Error running pod install:\n${result.stdout}'); } } }