Don't require .packages file for flutter packages command (#12258)

(it's the command that populates the .packages file)
This commit is contained in:
Todd Volkert 2017-09-26 09:12:40 -07:00 committed by GitHub
parent 3433f42b09
commit bb0a724a1d

View File

@ -347,7 +347,7 @@ abstract class FlutterCommand extends Command<Null> {
}
// Validate the current package map only if we will not be running "pub get" later.
if (!(_usesPubOption && argResults['pub'])) {
if (parent?.name != 'packages' && !(_usesPubOption && argResults['pub'])) {
final String error = new PackageMap(PackageMap.globalPackagesPath).checkValid();
if (error != null)
throw new ToolExit(error);