From 579991cbb32d211d9551df390809117e9ad18f31 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 17 Aug 2023 17:11:57 -0700 Subject: [PATCH] Fix the name of the local-engine-host flag in the warning message (#132808) --- packages/flutter_tools/lib/src/base/user_messages.dart | 2 +- .../test/general.shard/runner/local_engine_test.dart | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/base/user_messages.dart b/packages/flutter_tools/lib/src/base/user_messages.dart index 6ebaa13471..54305b36f3 100644 --- a/packages/flutter_tools/lib/src/base/user_messages.dart +++ b/packages/flutter_tools/lib/src/base/user_messages.dart @@ -310,7 +310,7 @@ class UserMessages { 'You must specify --local-engine or --local-web-sdk if you are using a locally built engine or web sdk.'; // TODO(matanlurey): Make this an error, https://github.com/flutter/flutter/issues/132245. String runnerLocalEngineRequiresHostEngine({bool warning = false}) => - '${warning ? 'Warning! ' : ''}You are using a locally built engine (--local-engine) but have not specified --local-host-engine.\n' + '${warning ? 'Warning! ' : ''}You are using a locally built engine (--local-engine) but have not specified --local-engine-host.\n' 'You may be building with a different engine than the one you are running with. ' 'See https://github.com/flutter/flutter/issues/132245 for details (in the future this will become ' 'an error).'; diff --git a/packages/flutter_tools/test/general.shard/runner/local_engine_test.dart b/packages/flutter_tools/test/general.shard/runner/local_engine_test.dart index b18a3633a2..e8570fddfa 100644 --- a/packages/flutter_tools/test/general.shard/runner/local_engine_test.dart +++ b/packages/flutter_tools/test/general.shard/runner/local_engine_test.dart @@ -119,7 +119,7 @@ void main() { expect(logger.traceText, contains('Local engine source at /arbitrary/engine/src')); }); - testWithoutContext('works but produces a warning if --local-engine is specified but not --local-host-engine', () async { + testWithoutContext('works but produces a warning if --local-engine is specified but not --local-engine-host', () async { final FileSystem fileSystem = MemoryFileSystem.test(); final Directory localEngine = fileSystem .directory('$kArbitraryEngineRoot/src/out/android_debug_unopt_arm64/') @@ -142,7 +142,7 @@ void main() { targetEngine: '/arbitrary/engine/src/out/android_debug_unopt_arm64', ), ); - expect(logger.statusText, contains('Warning! You are using a locally built engine (--local-engine) but have not specified --local-host-engine')); + expect(logger.statusText, contains('Warning! You are using a locally built engine (--local-engine) but have not specified --local-engine-host')); }); testWithoutContext('fails if --local-engine-host is emitted and treatMissingLocalEngineHostAsFatal is set', () async { @@ -164,7 +164,7 @@ void main() { await expectLater( localEngineLocator.findEnginePath(localEngine: localEngine.path), - throwsToolExit(message: 'You are using a locally built engine (--local-engine) but have not specified --local-host-engine'), + throwsToolExit(message: 'You are using a locally built engine (--local-engine) but have not specified --local-engine-host'), ); });