Fix the name of the local-engine-host flag in the warning message (#132808)

This commit is contained in:
Jason Simmons 2023-08-17 17:11:57 -07:00 committed by GitHub
parent f68d03f1cd
commit 579991cbb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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).';

View File

@ -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'),
);
});