From adf279f3080fe20ee7dbdddda3c2d96ce0d44e81 Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 18 May 2024 17:42:22 -0600 Subject: [PATCH] Fix template manifest test (#148616) `'flutter create should tool exit if the template manifest cannot be read'` fails consistently, as shown by #148614. The test expects a `ToolExit` with the message "Unable to read the template manifest", but depending on how the test is being run, a different exception ("Cannot create a project within the Flutter SDK") is sometimes thrown first. This pull request relocates the test project to `dev/` to prevent the extraneous error. --- .../test/commands.shard/permeable/create_test.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart index ce88d122d5edb..3dbd30c68e93c 100644 --- a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart @@ -3776,7 +3776,7 @@ void main() { '--no-pub', '--template=plugin', '--project-name=test', - projectDir.path, + 'dev/test', ]), throwsToolExit(message: 'Unable to read the template manifest at path'), ); @@ -3784,8 +3784,7 @@ void main() { FileSystem: () => MemoryFileSystem.test( opHandle: (String context, FileSystemOp operation) { if (operation == FileSystemOp.read && context.contains('template_manifest.json')) { - throw io.PathNotFoundException( - context, const OSError(), 'Cannot open file'); + throw io.PathNotFoundException(context, const OSError(), 'Cannot open file'); } }, ),