Unverified Commit 91d6c972 authored by Emmanuel Garcia's avatar Emmanuel Garcia Committed by GitHub

Fix bug when resolving entrypoint against package config (#81248)

parent 0866005f
...@@ -45,9 +45,8 @@ class DartPluginRegistrantTarget extends Target { ...@@ -45,9 +45,8 @@ class DartPluginRegistrantTarget extends Target {
final String targetFile = environment.defines[kTargetFile] ?? final String targetFile = environment.defines[kTargetFile] ??
environment.fileSystem.path.join('lib', 'main.dart'); environment.fileSystem.path.join('lib', 'main.dart');
final File mainFile = environment.fileSystem.file(targetFile); final File mainFile = environment.fileSystem.file(targetFile);
final Uri mainFileUri = mainFile.uri; final Uri mainFileUri = mainFile.absolute.uri;
assert(packagesFile.path != null); final String mainUri = packageConfig.toPackageUri(mainFileUri)?.toString() ?? mainFileUri.toString();
final String mainUri = packageConfig.toPackageUri(mainFileUri)?.toString();
final File newMainDart = environment.projectDir final File newMainDart = environment.projectDir
.childDirectory('.dart_tool') .childDirectory('.dart_tool')
.childDirectory('flutter_build') .childDirectory('flutter_build')
......
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