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

[script/tool] Use 'dart pub' instead of deprecated 'pub' #3991

Merged
merged 2 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions script/tool/lib/src/test_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ class TestCommand extends PluginCommand {
);
} else {
exitCode = await processRunner.runAndStream(
'pub',
<String>['get'],
'dart',
<String>['pub', 'get'],
workingDir: packageDir,
);
if (exitCode == 0) {
exitCode = await processRunner.runAndStream(
'pub',
'dart',
<String>[
'pub',
'run',
if (enableExperiment.isNotEmpty)
'--enable-experiment=$enableExperiment',
Expand Down
12 changes: 6 additions & 6 deletions script/tool/test/test_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ void main() {
'flutter',
const <String>['test', '--color', '--enable-experiment=exp1'],
plugin1Dir.path),
ProcessCall('pub', const <String>['get'], plugin2Dir.path),
ProcessCall('dart', const <String>['pub', 'get'], plugin2Dir.path),
ProcessCall(
'pub',
const <String>['run', '--enable-experiment=exp1', 'test'],
'dart',
const <String>['pub', 'run', '--enable-experiment=exp1', 'test'],
plugin2Dir.path),
]),
);
Expand Down Expand Up @@ -149,10 +149,10 @@ void main() {
'flutter',
const <String>['test', '--color', '--enable-experiment=exp1'],
plugin1Dir.path),
ProcessCall('pub', const <String>['get'], plugin2Dir.path),
ProcessCall('dart', const <String>['pub', 'get'], plugin2Dir.path),
ProcessCall(
'pub',
const <String>['run', '--enable-experiment=exp1', 'test'],
'dart',
const <String>['pub', 'run', '--enable-experiment=exp1', 'test'],
plugin2Dir.path),
]),
);
Expand Down