Unverified Commit 2dbf0106 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Create dart tool directory if it is missing (#39543)

parent eefe9d95
......@@ -140,6 +140,10 @@ class WebFs {
@required FlutterProject flutterProject,
@required BuildInfo buildInfo
}) async {
// workaround for https://github.com/flutter/flutter/issues/38290
if (!flutterProject.dartTool.existsSync()) {
flutterProject.dartTool.createSync(recursive: true);
}
// Start the build daemon and run an initial build.
final BuildDaemonClient client = await buildDaemonCreator
.startBuildDaemon(fs.currentDirectory.path, release: buildInfo.isRelease, profile: buildInfo.isProfile);
......
......@@ -72,10 +72,11 @@ void main() {
});
test('Can create webFs from mocked interfaces', () => testbed.run(() async {
final FlutterProject flutterProject = FlutterProject.current();
await WebFs.start(
target: fs.path.join('lib', 'main.dart'),
buildInfo: BuildInfo.debug,
flutterProject: FlutterProject.current(),
flutterProject: flutterProject,
);
// The build daemon is told to build once.
......@@ -83,6 +84,9 @@ void main() {
// Chrome is launched based on port from above.
verify(mockChromeLauncher.launch('http://localhost:1234/')).called(1);
// .dart_tool directory is created.
expect(flutterProject.dartTool.existsSync(), true);
}));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment