[flutter_tools] dont crash on invalid utf8 in pubspec (#73891)
This commit is contained in:
@@ -221,6 +221,12 @@ class FlutterProject {
|
||||
} on YamlException catch (e) {
|
||||
logger.printStatus('Error detected in pubspec.yaml:', emphasis: true);
|
||||
logger.printError('$e');
|
||||
} on FormatException catch (e) {
|
||||
logger.printError('Error detected while parsing pubspec.yaml:', emphasis: true);
|
||||
logger.printError('$e');
|
||||
} on FileSystemException catch (e) {
|
||||
logger.printError('Error detected while reading pubspec.yaml:', emphasis: true);
|
||||
logger.printError('$e');
|
||||
}
|
||||
if (manifest == null) {
|
||||
throwToolExit('Please correct the pubspec.yaml file at $path');
|
||||
|
||||
Reference in New Issue
Block a user