runWithOutput method
Future<void>
runWithOutput(
- Configuration<
BuildSecretSetCommandConfig> commandConfig, - CommandOutput output
override
Runs this command with prepared configuration and output.
Subclasses should override this method.
Implementation
@override
Future<void> runWithOutput(
final Configuration<BuildSecretSetCommandConfig> commandConfig,
final CommandOutput output,
) async {
final projectId = commandConfig.value(
BuildSecretSetCommandConfig.projectId,
);
final name = commandConfig.value(BuildSecretSetCommandConfig.name);
final buildSecretType = commandConfig.value(
BuildSecretSetCommandConfig.buildSecretType,
);
final valueToSet = commandConfig.valueOrFileContent(
value: BuildSecretSetCommandConfig.value,
valueFile: BuildSecretSetCommandConfig.valueFile,
);
await renderCommand(
output,
operation: () => BuildsOperations.setBuildSecret(
runner.serviceProvider.cloudApiClient,
projectId: projectId,
name: name,
value: valueToSet,
buildSecretType: buildSecretType,
),
textOutputUi: const BuildSecretSetTextUi(),
);
}