Commit c1e3b75c authored by xster's avatar xster Committed by GitHub

Verbose cocoapods output if error or flutter is verbose (#11048)

* Output verbose cocoapods output when pod install has an error or if flutter build/run is in -v

* remove repeated stdout
parent e5009e88
......@@ -437,14 +437,23 @@ Future<Null> _runPodInstall(Directory bundle, String engineDirectory) async {
}
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},
<String>['pod', 'install', '--verbose'],
workingDirectory: bundle.path,
environment: <String, String>{'FLUTTER_FRAMEWORK_DIR': engineDirectory},
);
status.stop();
if (result.exitCode != 0) {
throwToolExit('Error running pod install:\n${result.stdout}');
if (logger.isVerbose || result.exitCode != 0) {
if (result.stdout.isNotEmpty) {
printStatus('CocoaPods\' output:\n↳');
printStatus(result.stdout, indent: 4);
}
if (result.stderr.isNotEmpty) {
printStatus('Error output from CocoaPods:\n↳');
printStatus(result.stderr, indent: 4);
}
}
if (result.exitCode != 0)
throwToolExit('Error running pod install');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment