(config: &Config)
| 192 | } |
| 193 | |
| 194 | async fn get_template(config: &Config) -> Result<TemplateRoot> { |
| 195 | let progress = Progress::start("downloading template"); |
| 196 | |
| 197 | let template_option = match config.template.as_deref() { |
| 198 | Some(t) => t, |
| 199 | None if config.extension => extensions::DEFAULT_TEMPLATE_URL, |
| 200 | None => functions::DEFAULT_TEMPLATE_URL, |
| 201 | }; |
| 202 | |
| 203 | let template_source = TemplateSource::try_from(template_option); |
| 204 | match template_source { |
| 205 | Ok(ts) => { |
| 206 | let result = ts.expand().await; |
| 207 | progress.finish_and_clear(); |
| 208 | result |
| 209 | } |
| 210 | Err(e) => { |
| 211 | progress.finish_and_clear(); |
| 212 | Err(e) |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | #[tracing::instrument(target = "cargo_lambda")] |
| 218 | async fn create_project<T: AsRef<Path> + Debug>( |
no test coverage detected