aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/repository_interface.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/repository/repository_interface.rs')
-rw-r--r--crates/shirabe/src/repository/repository_interface.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/shirabe/src/repository/repository_interface.rs b/crates/shirabe/src/repository/repository_interface.rs
index ab25242c..cece0d6f 100644
--- a/crates/shirabe/src/repository/repository_interface.rs
+++ b/crates/shirabe/src/repository/repository_interface.rs
@@ -94,7 +94,10 @@ pub trait RepositoryInterface: std::fmt::Debug {
package_name: String,
) -> anyhow::Result<IndexMap<String, ProviderInfo>>;
- fn get_repo_name(&self) -> String;
+ // PHP's getRepoName() can throw: ArrayRepository::getRepoName() counts through the
+ // late-bound $this->initialize(), which is fallible in subclasses that read files
+ // (FilesystemRepository, PackageRepository).
+ fn get_repo_name(&self) -> anyhow::Result<String>;
fn as_advisory_provider(&self) -> Option<&dyn AdvisoryProviderInterface> {
None