Fix tool exit message shown when user provides a non-list to "assets" for a deferred component (#137837)
Fixes #136163
This commit is contained in:
@@ -642,7 +642,7 @@ void _validateDeferredComponents(MapEntry<Object?, Object?> kvp, List<String> er
|
||||
if (valueMap.containsKey('assets')) {
|
||||
final Object? assets = valueMap['assets'];
|
||||
if (assets is! YamlList) {
|
||||
errors.add('Expected "assets" key in the $i element of "${kvp.key}" to be a list, but got $assets (${assets.runtimeType}).');
|
||||
errors.add('Expected "assets" to be a list, but got $assets (${assets.runtimeType}).');
|
||||
} else {
|
||||
_validateListType<String>(assets, errors, '"assets" key in the $i element of "${kvp.key}"', 'file paths');
|
||||
}
|
||||
|
||||
@@ -1459,7 +1459,7 @@ flutter:
|
||||
);
|
||||
|
||||
expect(flutterManifest, null);
|
||||
expect(logger.errorText, 'Expected "assets" key in the 0 element of "deferred-components" to be a list, but got blah (String).\n');
|
||||
expect(logger.errorText, 'Expected "assets" to be a list, but got blah (String).\n');
|
||||
});
|
||||
|
||||
testWithoutContext('FlutterManifest parses asset-only deferred components', () async {
|
||||
|
||||
Reference in New Issue
Block a user