Unverified Commit c56b4551 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

ensure unpack declares required artifacts (#33454)

parent 786d9cee
...@@ -72,6 +72,27 @@ class UnpackCommand extends FlutterCommand { ...@@ -72,6 +72,27 @@ class UnpackCommand extends FlutterCommand {
@override @override
bool get isExperimental => true; bool get isExperimental => true;
@override
Future<Set<DevelopmentArtifact>> get requiredArtifacts async {
final Set<DevelopmentArtifact> result = <DevelopmentArtifact>{
DevelopmentArtifact.universal,
};
final TargetPlatform targetPlatform = getTargetPlatformForName(argResults['target-platform']);
switch (targetPlatform) {
case TargetPlatform.darwin_x64:
result.add(DevelopmentArtifact.macOS);
break;
case TargetPlatform.windows_x64:
result.add(DevelopmentArtifact.windows);
break;
case TargetPlatform.linux_x64:
result.add(DevelopmentArtifact.linux);
break;
default:
}
return result;
}
@override @override
Future<FlutterCommandResult> runCommand() async { Future<FlutterCommandResult> runCommand() async {
final String targetName = argResults['target-platform']; final String targetName = argResults['target-platform'];
......
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