runWithOutput method
Future<void>
runWithOutput(
- Configuration<
ProjectUserInviteOption> commandConfig, - CommandOutput output
override
Runs this command with prepared configuration and output.
Subclasses should override this method.
Implementation
@override
Future<void> runWithOutput(
final Configuration<ProjectUserInviteOption> commandConfig,
final CommandOutput output,
) async {
final projectId = commandConfig.value(ProjectUserInviteOption.projectId);
final userEmail = commandConfig.value(ProjectUserInviteOption.user);
final roles = commandConfig.value(ProjectUserInviteOption.roles);
await renderCommand(
output,
operation: () => UserCommands.inviteUser(
runner.serviceProvider.cloudApiClient,
projectId: projectId,
email: userEmail,
assignRoleNames: roles,
),
textOutputUi: const ProjectUserInviteTextUi(),
);
}