doDescribe method
If id
is already in the system cache, just loads it from there.
Otherwise, defers to the subclass.
Implementation
@override
Future<Pubspec> doDescribe(PackageId id, SystemCache cache) async {
final packageDir = getDirectoryInCache(id, cache);
if (fileExists(p.join(packageDir, 'pubspec.yaml'))) {
return Pubspec.load(
packageDir,
cache.sources,
expectedName: id.name,
containingDescription: id.description.description,
);
}
return await describeUncached(id, cache);
}