Fix the name of the local-engine-host flag in the warning message (#132808)
diff --git a/packages/flutter_tools/lib/src/base/user_messages.dart b/packages/flutter_tools/lib/src/base/user_messages.dart
index 6ebaa13..54305b3 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 @@
'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 b18a363..e8570fd 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 @@
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 @@
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 @@
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'),
);
});