catch the error returned by add_repo_status
If add_repo_status returns an error it will eventually be printed to the
user but there won't be any repository information:
[✘] Error getting status: No branch checked out
Catch the error earlier so we can print the repository name:
[✘] Error: freebsd-src: Couldn't add repo status: No branch checked out
This commit is contained in:
@@ -185,7 +185,11 @@ pub fn get_status_table(config: config::Config) -> Result<(Vec<Table>, Vec<Strin
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
add_repo_status(&mut table, &repo.name, &repo_handle, repo.worktree_setup)?;
|
if let Err(err) =
|
||||||
|
add_repo_status(&mut table, &repo.name, &repo_handle, repo.worktree_setup)
|
||||||
|
{
|
||||||
|
errors.push(format!("{}: Couldn't add repo status: {}", &repo.name, err));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tables.push(table);
|
tables.push(table);
|
||||||
|
|||||||
Reference in New Issue
Block a user