Unverified Commit 89692884 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[flutter_tools] Fix local engine preview device (#138046)

Fixes https://github.com/flutter/flutter/issues/137982
parent e7246898
......@@ -1028,7 +1028,12 @@ class CachedLocalEngineArtifacts implements Artifacts {
case Artifact.flutterToolsFileGenerators:
return _getFileGeneratorsPath();
case Artifact.flutterPreviewDevice:
throw UnimplementedError('The preview device is not supported with local engine builds');
return _backupCache.getArtifactPath(
artifact,
platform: platform,
mode: mode,
environmentType: environmentType,
);
}
}
......
......@@ -329,6 +329,14 @@ void main() {
'snapshots', 'frontend_server_aot.dart.snapshot')
);
expect(
artifacts.getArtifactPath(
Artifact.flutterPreviewDevice,
platform: TargetPlatform.windows_x64,
),
fileSystem.path.join('root', 'bin', 'cache', 'artifacts',
'flutter_preview', 'flutter_preview.exe'),
);
fileSystem.file(fileSystem.path.join('/out', 'host_debug_unopt', 'impellerc'))
.createSync(recursive: 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