findVariable static method
Implementation
static Future<Map<String, Object?>> findVariable(
final Client cloudApiClient, {
required final String baseCommand,
required final String projectId,
required final String name,
}) async {
_validateName(baseCommand, name);
final listed = await _fetch(cloudApiClient, projectId);
final existingStore = _storeOf(
name,
unmasked: listed.unmasked,
secrets: listed.secrets,
);
if (existingStore == null) {
throw FailureException(
error: 'The environment variable "$name" was not found.',
);
}
return {'name': name, 'secret': existingStore == _VariableStore.secret};
}