mirror of
https://github.com/flutter/flutter
synced 2024-10-14 04:02:56 +00:00
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
This commit is contained in:
parent
e5009e8827
commit
c1e3b75cc2
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue