runCommand<I extends Input, O extends Output> function
Performs command's steps in order and returns the run — including whether
every step did what it had said it would.
This is --apply --autoapprove. Approval belongs to the framework, and a
test that wants to exercise the asking should drive a whole ModularCli
with an Approver; that is the right way to test approval, and the wrong
way to test a command.
Implementation
Future<Execution> runCommand<I extends Input, O extends Output>(
Command<I, O> command,
) async => const PreviewExecutor().perform(await command.steps());