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

Commit 8430ecb

Browse files
authored
[script/tool] Use 'dart pub' instead of deprecated 'pub' (#3991)
1 parent 4bea573 commit 8430ecb

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

script/tool/lib/src/test_command.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ class TestCommand extends PluginCommand {
6666
);
6767
} else {
6868
exitCode = await processRunner.runAndStream(
69-
'pub',
70-
<String>['get'],
69+
'dart',
70+
<String>['pub', 'get'],
7171
workingDir: packageDir,
7272
);
7373
if (exitCode == 0) {
7474
exitCode = await processRunner.runAndStream(
75-
'pub',
75+
'dart',
7676
<String>[
77+
'pub',
7778
'run',
7879
if (enableExperiment.isNotEmpty)
7980
'--enable-experiment=$enableExperiment',

script/tool/test/test_command_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ void main() {
9494
'flutter',
9595
const <String>['test', '--color', '--enable-experiment=exp1'],
9696
plugin1Dir.path),
97-
ProcessCall('pub', const <String>['get'], plugin2Dir.path),
97+
ProcessCall('dart', const <String>['pub', 'get'], plugin2Dir.path),
9898
ProcessCall(
99-
'pub',
100-
const <String>['run', '--enable-experiment=exp1', 'test'],
99+
'dart',
100+
const <String>['pub', 'run', '--enable-experiment=exp1', 'test'],
101101
plugin2Dir.path),
102102
]),
103103
);
@@ -149,10 +149,10 @@ void main() {
149149
'flutter',
150150
const <String>['test', '--color', '--enable-experiment=exp1'],
151151
plugin1Dir.path),
152-
ProcessCall('pub', const <String>['get'], plugin2Dir.path),
152+
ProcessCall('dart', const <String>['pub', 'get'], plugin2Dir.path),
153153
ProcessCall(
154-
'pub',
155-
const <String>['run', '--enable-experiment=exp1', 'test'],
154+
'dart',
155+
const <String>['pub', 'run', '--enable-experiment=exp1', 'test'],
156156
plugin2Dir.path),
157157
]),
158158
);

0 commit comments

Comments
 (0)