mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:00:09 +00:00
Attempt to fix Windows bots (TBR)
Change-Id: Ieccd570d9472a457a7fa0acece121eba6bfa71e7 Reviewed-on: https://dart-review.googlesource.com/31241 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
4dfa6a4b9c
commit
48eb23149a
|
@ -125,13 +125,14 @@ class PubspecValidator {
|
|||
if (flutterField is YamlMap) {
|
||||
YamlNode assetsField = flutterField.nodes[ASSETS_FIELD];
|
||||
if (assetsField is YamlList) {
|
||||
String packageRoot = path.dirname(source.fullName);
|
||||
path.Context context = provider.pathContext;
|
||||
String packageRoot = context.dirname(source.fullName);
|
||||
for (YamlNode entryValue in assetsField.nodes) {
|
||||
if (entryValue is YamlScalar) {
|
||||
Object entry = entryValue.value;
|
||||
if (entry is String) {
|
||||
String normalizedEntry = path.joinAll(path.posix.split(entry));
|
||||
String assetPath = path.join(packageRoot, normalizedEntry);
|
||||
String normalizedEntry = context.joinAll(path.posix.split(entry));
|
||||
String assetPath = context.join(packageRoot, normalizedEntry);
|
||||
if (!provider.getFile(assetPath).exists) {
|
||||
_reportErrorForNode(
|
||||
reporter,
|
||||
|
|
Loading…
Reference in a new issue