Unverified Commit 2c070363 authored by shrike69's avatar shrike69 Committed by GitHub

Use binary name to locate .packages file on Fuchsia (#19217)

parent 43773140
......@@ -326,11 +326,6 @@ class FuchsiaReloadCommand extends FlutterCommand {
if (!_fileExists(_target))
throwToolExit('Couldn\'t find application entry point at $_target.');
final String packagesFileName = '${_projectName}_dart_library.packages';
_dotPackagesPath = '$_buildDir/dartlang/gen/$_projectRoot/$packagesFileName';
if (!_fileExists(_dotPackagesPath))
throwToolExit('Couldn\'t find .packages file at $_dotPackagesPath.');
final String nameOverride = argResults['name-override'];
if (nameOverride == null) {
_binaryName = _projectName;
......@@ -338,6 +333,13 @@ class FuchsiaReloadCommand extends FlutterCommand {
_binaryName = nameOverride;
}
// When there's an override of the on-device binary name, use that name
// to locate the .packages file.
final String packagesFileName = '${_binaryName}_dart_library.packages';
_dotPackagesPath = '$_buildDir/dartlang/gen/$_projectRoot/$packagesFileName';
if (!_fileExists(_dotPackagesPath))
throwToolExit('Couldn\'t find .packages file at $_dotPackagesPath.');
final String isolateNumber = argResults['isolate-number'];
if (isolateNumber == null) {
_isolateNumber = '';
......
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