Omit the package names from the license text. (#5102)

This was a minor typo in the original code. It makes the license display
slightly cleaner.
This commit is contained in:
Ian Hickson 2016-07-27 14:28:53 -07:00 committed by GitHub
parent 8219ab61ab
commit db8ff48dd4

View File

@ -216,8 +216,8 @@ Future<AssetBundleEntry> _obtainLicenses(
final List<String> rawLicenses =
(await file.readAsString()).split(_licenseSeparator);
for (String rawLicense in rawLicenses) {
String licenseText;
List<String> packageNames;
String licenseText;
if (packageName == 'sky_engine') {
final int split = rawLicense.indexOf('\n\n');
if (split >= 0) {
@ -226,10 +226,10 @@ Future<AssetBundleEntry> _obtainLicenses(
}
}
if (licenseText == null) {
licenseText = rawLicense;
packageNames = <String>[packageName];
licenseText = rawLicense;
}
packageLicenses.putIfAbsent(rawLicense, () => new Set<String>())
packageLicenses.putIfAbsent(licenseText, () => new Set<String>())
..addAll(packageNames);
}
}