Skip to content

Commit 8c55ef0

Browse files
committed
Stop using pub command
1 parent 6b33930 commit 8c55ef0

File tree

5 files changed

+14
-56
lines changed

5 files changed

+14
-56
lines changed

.travis.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The latest release of `webdev_proxy` requires the following:
1616
installed as a package dependency.
1717

1818
```bash
19-
$ pub global activate webdev_proxy
19+
$ dart pub global activate webdev_proxy
2020
```
2121

2222
Learn more about activating and using packages [here][pub-global].

lib/src/webdev_proc_utils.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ ProcessResult cachedWebdevVersionResult;
3030
/// activated, or `null` if it is not activated.
3131
Version getGlobalWebdevVersion() {
3232
cachedWebdevVersionResult ??= Process.runSync(
33-
'pub',
34-
['global', 'run', 'webdev', '--version'],
33+
'dart',
34+
['pub', 'global', 'run', 'webdev', '--version'],
3535
stdoutEncoding: utf8,
3636
);
3737
if (cachedWebdevVersionResult.exitCode != 0) {
@@ -53,8 +53,8 @@ Future<int> printWebdevServeHelp() async {
5353
'====================\n'),
5454
);
5555
final process = await Process.start(
56-
'pub',
57-
['global', 'run', 'webdev', 'help', 'serve'],
56+
'dart',
57+
['pub', 'global', 'run', 'webdev', 'help', 'serve'],
5858
mode: ProcessStartMode.inheritStdio,
5959
);
6060
return process.exitCode;

lib/src/webdev_server.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ class WebdevServer {
3838
/// Starts a `webdev serve` process with the given [args] and returns a
3939
/// [WebdevServer] abstraction over said process.
4040
static Future<WebdevServer> start(List<String> args) async {
41-
final webdevArgs = ['global', 'run', 'webdev', 'serve', ...args];
42-
log.fine('Running `pub ${webdevArgs.join(' ')}');
41+
final webdevArgs = ['pub', 'global', 'run', 'webdev', 'serve', ...args];
42+
log.fine('Running `dart ${webdevArgs.join(' ')}');
4343
final process = await Process.start(
44-
'pub',
44+
'dart',
4545
webdevArgs,
4646
mode: ProcessStartMode.inheritStdio,
4747
);

test/util.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import 'package:test/test.dart';
1919

2020
Future<Null> activateWebdev(String constraint) async {
2121
final process = await Process.start(
22-
'pub',
23-
['global', 'activate', 'webdev', constraint],
22+
'dart',
23+
['pub', 'global', 'activate', 'webdev', constraint],
2424
mode: ProcessStartMode.inheritStdio,
2525
);
2626
expect(await process.exitCode, 0,
@@ -34,8 +34,8 @@ Future<Null> deactivateWebdev() async {
3434
return;
3535
}
3636
final process = await Process.start(
37-
'pub',
38-
['global', 'deactivate', 'webdev'],
37+
'dart',
38+
['pub', 'global', 'deactivate', 'webdev'],
3939
mode: ProcessStartMode.inheritStdio,
4040
);
4141
expect(await process.exitCode, 0,
@@ -48,8 +48,8 @@ final webdevGlobalPattern = RegExp(r'webdev [\d.]+');
4848

4949
bool isWebdevGlobalActivated() {
5050
final procResult = Process.runSync(
51-
'pub',
52-
['global', 'list'],
51+
'dart',
52+
['pub', 'global', 'list'],
5353
stdoutEncoding: utf8,
5454
);
5555
return procResult.stdout

0 commit comments

Comments
 (0)