Skip to content

Commit adf279f

Browse files
Fix template manifest test (flutter#148616)
`'flutter create should tool exit if the template manifest cannot be read'` fails consistently, as shown by flutter#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.
1 parent 791a782 commit adf279f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/flutter_tools/test/commands.shard/permeable/create_test.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3776,16 +3776,15 @@ void main() {
37763776
'--no-pub',
37773777
'--template=plugin',
37783778
'--project-name=test',
3779-
projectDir.path,
3779+
'dev/test',
37803780
]),
37813781
throwsToolExit(message: 'Unable to read the template manifest at path'),
37823782
);
37833783
}, overrides: <Type, Generator>{
37843784
FileSystem: () => MemoryFileSystem.test(
37853785
opHandle: (String context, FileSystemOp operation) {
37863786
if (operation == FileSystemOp.read && context.contains('template_manifest.json')) {
3787-
throw io.PathNotFoundException(
3788-
context, const OSError(), 'Cannot open file');
3787+
throw io.PathNotFoundException(context, const OSError(), 'Cannot open file');
37893788
}
37903789
},
37913790
),

0 commit comments

Comments
 (0)