Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[scripts/tool] use 'flutter pub get' for both dart and flutter packages #3973

Merged
merged 3 commits into from
May 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions script/tool/lib/src/analyze_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,10 @@ class AnalyzeCommand extends PluginCommand {
throw ToolExit(1);
}

await for (final Directory package in getPackages()) {
if (isFlutterPackage(package, fileSystem)) {
await processRunner.runAndStream('flutter', <String>['packages', 'get'],
workingDir: package, exitOnError: true);
} else {
await processRunner.runAndStream('dart', <String>['pub', 'get'],
workingDir: package, exitOnError: true);
}
final List<Directory> packageDirectories = await getPackages().toList();
for (final Directory package in packageDirectories) {
await processRunner.runAndStream('flutter', <String>['packages', 'get'],
workingDir: package, exitOnError: true);
}

// Use the Dart SDK override if one was passed in.
Expand All @@ -79,7 +75,8 @@ class AnalyzeCommand extends PluginCommand {
dartSdk == null ? 'dart' : p.join(dartSdk, 'bin', 'dart');

final List<String> failingPackages = <String>[];
await for (final Directory package in getPlugins()) {
final List<Directory> pluginDirectories = await getPlugins().toList();
for (final Directory package in pluginDirectories) {
final int exitCode = await processRunner.runAndStream(
dartBinary, <String>['analyze', '--fatal-infos'],
workingDir: package);
Expand Down