Document why some lints aren't enabled and fix some minor issues. (#91527)

This commit is contained in:
Ian Hickson
2021-10-09 04:03:03 -07:00
committed by GitHub
parent cd5936e41d
commit b3f63d38ac
5 changed files with 62 additions and 63 deletions

View File

@@ -305,10 +305,11 @@ class PackagesInteractiveGetCommand extends FlutterCommand {
List<String> rest = argResults.rest;
final bool isHelp = rest.contains('-h') || rest.contains('--help');
String target;
if (rest.length == 1 && (rest[0].contains('/') || rest[0].contains(r'\'))) {
// HACK: Supporting flutter specific behavior where you can pass a
// folder to the command.
target = findProjectRoot(globals.fs, rest[0]);
if (rest.length == 1 && (rest.single.contains('/') || rest.single.contains(r'\'))) {
// For historical reasons, if there is one argument to the command and it contains
// a multiple-component path (i.e. contains a slash) then we use that to determine
// to which project we're applying the command.
target = findProjectRoot(globals.fs, rest.single);
rest = <String>[];
} else {
target = findProjectRoot(globals.fs);