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:
Brian Wilkerson 2017-12-21 13:00:14 -08:00
parent 4dfa6a4b9c
commit 48eb23149a

View file

@ -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,