runWithConfig method

  1. @override
Future<void> runWithConfig(
  1. Configuration<PasswordSetCommandConfig> commandConfig
)
override

Runs this command with prepared configuration (options). Subclasses should override this method.

Implementation

@override
Future<void> runWithConfig(
  final Configuration<PasswordSetCommandConfig> commandConfig,
) async {
  final projectId = commandConfig.value(PasswordSetCommandConfig.projectId);
  final name = commandConfig.value(PasswordSetCommandConfig.name);
  final valueToSet = commandConfig.valueOrFileContent(
    value: PasswordSetCommandConfig.value,
    valueFile: PasswordSetCommandConfig.valueFile,
  );

  await PasswordCommands.setPassword(
    runner.serviceProvider.cloudApiClient,
    logger: logger,
    projectId: projectId,
    name: name,
    value: valueToSet,
  );
}