From 645489f332f3438d7197f971ccca38f8d9da465d Mon Sep 17 00:00:00 2001 From: "piotr.maszota" Date: Mon, 29 Jan 2024 12:17:41 +0100 Subject: [PATCH 1/2] Print link to devtools regardless of open-devtools flag --- .../lib/src/crossplatform/flutter_tool.dart | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart b/packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart index b41df9f86..c2ad08396 100644 --- a/packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart +++ b/packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart @@ -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'); @@ -239,8 +244,6 @@ class FlutterTool { } Future _openDevtoolsPage(String url) async { - _logger.success('Patrol DevTools extension is available at $url'); - io.Process? process; switch (_platform.operatingSystem) { case Platform.macOS: From c40549467339132b7a5feb8e24922dbd0ddbcabb Mon Sep 17 00:00:00 2001 From: "piotr.maszota" Date: Mon, 29 Jan 2024 12:21:14 +0100 Subject: [PATCH 2/2] Update changelog --- packages/patrol/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/patrol/CHANGELOG.md b/packages/patrol/CHANGELOG.md index 35678612c..ea26d7252 100644 --- a/packages/patrol/CHANGELOG.md +++ b/packages/patrol/CHANGELOG.md @@ -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