runWithConfig method

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

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

Implementation

@override
Future<void> runWithConfig(
  final Configuration<ContextSetOption> commandConfig,
) async {
  final projectId = commandConfig.value(ContextSetOption.projectId);

  final settings = runner.serviceProvider.scloudSettings;
  await settings.setProjectContext(projectId);

  logger.success('Set the global project context to "$projectId".');
}