feat: Return an error if the remote type cannot be detected

This commit is contained in:
Baptiste Roux
2023-02-02 23:11:04 +01:00
parent 9b4ed2837e
commit 37094a3295
2 changed files with 63 additions and 30 deletions

View File

@@ -63,12 +63,13 @@ fn find_repos(root: &Path) -> Result<Option<(Vec<repo::Repo>, Vec<String>, bool)
let name = remote.name();
let url = remote.url();
let remote_type = match repo::detect_remote_type(&url) {
Some(t) => t,
None => {
Ok(t) => t,
Err(e) => {
warnings.push(format!(
"{}: Could not detect remote type of \"{}\"",
"{}: Could not detect remote type of \"{}\". Reason: {}",
&path::path_as_string(&path),
&url
&url,
e
));
continue;
}