Skip to content

Commit

Permalink
Merge pull request #2076 from leancodepl/fix/devtools-link
Browse files Browse the repository at this point in the history
Print link to devtools regardless of open-devtools flag
  • Loading branch information
piotruela authored Jan 29, 2024
2 parents 1712b5d + c405494 commit 61d3b63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/patrol/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Add optional timeout parameter to native methods (#2042).
- Add `$.native.tapAt()` (#2053)
- Fix `native.enterText` interacting with first EditText regardless of `Selector` passed (Android-only) (#2072)
- Print link to devtools regardless of open-devtools flag (#2076).

## 3.4.0

Expand Down
15 changes: 9 additions & 6 deletions packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,15 @@ class FlutterTool {
completer.complete();
}

if (openBrowser &&
line.startsWith('The Flutter DevTools debugger and profiler')) {
final url = _getDevtoolsUrl(line);
unawaited(_openDevtoolsPage(url));
if (line.startsWith('The Flutter DevTools debugger and profiler')) {
final devtoolsUrl = _getDevtoolsUrl(line);
_logger.success(
'Patrol DevTools extension is available at $devtoolsUrl',
);

if (openBrowser) {
unawaited(_openDevtoolsPage(devtoolsUrl));
}
}

_logger.detail('\t: $line');
Expand Down Expand Up @@ -239,8 +244,6 @@ class FlutterTool {
}

Future<void> _openDevtoolsPage(String url) async {
_logger.success('Patrol DevTools extension is available at $url');

io.Process? process;
switch (_platform.operatingSystem) {
case Platform.macOS:
Expand Down

0 comments on commit 61d3b63

Please sign in to comment.