(value: &str)
| 267 | } |
| 268 | |
| 269 | fn find_local_zip_file(value: &str) -> Option<PathBuf> { |
| 270 | // ignore error to fallback to other template options. |
| 271 | if let Ok(path) = dunce::realpath(value) |
| 272 | && path.exists() |
| 273 | && path.is_file() |
| 274 | && path.extension().unwrap_or_default() == "zip" |
| 275 | { |
| 276 | return Some(path); |
| 277 | } |
| 278 | |
| 279 | None |
| 280 | } |
| 281 | |
| 282 | fn match_git_http_url(original: &str) -> Option<GitRepo> { |
| 283 | let uri = translate_shortcut(original); |