only pass packages once (#24074)

This commit is contained in:
Jonah Williams
2018-11-07 21:57:00 -08:00
committed by GitHub
parent a6e901130e
commit d04fa1a670

View File

@@ -221,8 +221,10 @@ class KernelCompiler {
if (incrementalCompilerByteStorePath != null) {
command.add('--incremental');
}
Uri mainUri;
if (packagesPath != null) {
command.addAll(<String>['--packages', packagesPath]);
mainUri = _PackageUriMapper.findUri(mainPath, packagesPath);
}
if (outputFilePath != null) {
command.addAll(<String>['--output-dill', outputFilePath]);
@@ -242,11 +244,6 @@ class KernelCompiler {
if (extraFrontEndOptions != null)
command.addAll(extraFrontEndOptions);
Uri mainUri;
if (packagesPath != null) {
command.addAll(<String>['--packages', packagesPath]);
mainUri = _PackageUriMapper.findUri(mainPath, packagesPath);
}
command.add(mainUri?.toString() ?? mainPath);
printTrace(command.join(' '));