We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f78948 commit 1aecb65Copy full SHA for 1aecb65
pkg/compiler/lib/src/apiimpl.dart
@@ -379,6 +379,13 @@ class Compiler extends leg.Compiler {
379
if (packageConfigContents is String) {
380
packageConfigContents = UTF8.encode(packageConfigContents);
381
}
382
+ // The input provider may put a trailing 0 byte when it reads a source
383
+ // file, which confuses the package config parser.
384
+ if (packageConfigContents.length > 0
385
+ && packageConfigContents.last == 0) {
386
+ packageConfigContents = packageConfigContents.sublist(
387
+ 0, packageConfigContents.length - 1);
388
+ }
389
packages =
390
new MapPackages(pkgs.parse(packageConfigContents, packageConfig));
391
});
0 commit comments