Emit CocoaPods output if pod install fails (#11018)

In the case where the CocoaPods 'pod install' step fails, emit its
stdout to provide any potentially-useful error messages to the user.
This commit is contained in:
Chris Bracken
2017-06-28 11:58:06 -07:00
committed by GitHub
parent cb4a54db8f
commit a41e354a55

View File

@@ -434,16 +434,15 @@ Future<Null> _runPodInstall(Directory bundle, String engineDirectory) async {
);
return;
}
try {
final Status status = logger.startProgress('Running pod install...', expectSlowOperation: true);
await runCheckedAsync(
<String>['pod', 'install'],
workingDirectory: bundle.path,
environment: <String, String>{'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(
<String>['pod', 'install'],
workingDirectory: bundle.path,
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': engineDirectory},
);
status.stop();
if (result.exitCode != 0) {
throwToolExit('Error running pod install:\n${result.stdout}');
}
}
}