Commit ae1881e4 authored by John McCutchan's avatar John McCutchan Committed by Todd Volkert

Fix handling of empty --project-assets option (#6873)

parent 2b84d1ff
......@@ -69,6 +69,8 @@ class AssetBundle {
List<String> assets = projectAssets.split(',');
for (String asset in assets) {
if (asset == '')
continue;
final String assetPath = path.join(projectRoot, asset);
final String archivePath = asset;
entries.add(
......
......@@ -28,6 +28,10 @@ void main() {
test('does not need a rebuild', () async {
expect(new AssetBundle.fixed(null, null).needsBuild(), isFalse);
});
test('empty string', () async {
AssetBundle ab = new AssetBundle.fixed('', '');
expect(ab.entries, isEmpty);
});
test('single entry', () async {
AssetBundle ab = new AssetBundle.fixed('', 'apple.txt');
expect(ab.entries, isNotEmpty);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment