Skip to content

Commit 16c593a

Browse files
cbrackengspencergoog
authored andcommitted
Emit CocoaPods output if pod install fails (flutter#11018)
In the case where the CocoaPods 'pod install' step fails, emit its stdout to provide any potentially-useful error messages to the user.
1 parent b45447d commit 16c593a

File tree

1 file changed

+9
-10
lines changed
  • packages/flutter_tools/lib/src/ios

1 file changed

+9
-10
lines changed

packages/flutter_tools/lib/src/ios/mac.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -434,16 +434,15 @@ Future<Null> _runPodInstall(Directory bundle, String engineDirectory) async {
434434
);
435435
return;
436436
}
437-
try {
438-
final Status status = logger.startProgress('Running pod install...', expectSlowOperation: true);
439-
await runCheckedAsync(
440-
<String>['pod', 'install'],
441-
workingDirectory: bundle.path,
442-
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': engineDirectory},
443-
);
444-
status.stop();
445-
} catch (e) {
446-
throwToolExit('Error running pod install: $e');
437+
final Status status = logger.startProgress('Running pod install...', expectSlowOperation: true);
438+
final ProcessResult result = await processManager.run(
439+
<String>['pod', 'install'],
440+
workingDirectory: bundle.path,
441+
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': engineDirectory},
442+
);
443+
status.stop();
444+
if (result.exitCode != 0) {
445+
throwToolExit('Error running pod install:\n${result.stdout}');
447446
}
448447
}
449448
}

0 commit comments

Comments
 (0)