Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Change support for VM service message from "Dart VM Service listening" to "The Dart VM Service is listening" #365

Merged
merged 2 commits into from
Feb 7, 2022
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
2 changes: 1 addition & 1 deletion lib/src/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Future<dynamic> retry(Future Function() f, Duration interval,
/// Potentially useful as a means to extract it from log statements.
Uri? extractVMServiceUri(String str) {
final listeningMessageRegExp = RegExp(
r'(?:Observatory|Dart VM Service) listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)',
r'(?:Observatory|The Dart VM Service is) listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)',
);
final match = listeningMessageRegExp.firstMatch(str);
if (match != null) {
Expand Down
3 changes: 2 additions & 1 deletion test/util_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ void main() {
});

test('handles new Dart VM service message format', () {
const msg = 'Dart VM Service listening on http://foo.bar:9999/cG90YXRv/';
const msg =
'The Dart VM Service is listening on http://foo.bar:9999/cG90YXRv/';
expect(
extractVMServiceUri(msg), Uri.parse('http://foo.bar:9999/cG90YXRv/'));
});
Expand Down