aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/vcs/vcs_driver_interface.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-05 18:09:25 +0900
committernsfisis <nsfisis@gmail.com>2026-07-05 18:09:25 +0900
commit8aae17870a5ec2fdd9f0d4d61d33c792ff7b62b0 (patch)
tree4e589da29ead636082aeaaff4c674fd60227dcea /crates/shirabe/src/repository/vcs/vcs_driver_interface.rs
parenta666f969ff42578ce583c481fb6093673203a924 (diff)
downloadphp-shirabe-8aae17870a5ec2fdd9f0d4d61d33c792ff7b62b0.tar.gz
php-shirabe-8aae17870a5ec2fdd9f0d4d61d33c792ff7b62b0.tar.zst
php-shirabe-8aae17870a5ec2fdd9f0d4d61d33c792ff7b62b0.zip
fix(git-bitbucket-driver): match PHP exception/fallibility semantics for fallback paths
VcsDriverInterface::get_source/get_dist were made fallible in the Rust port even though PHP's are infallible, forcing GitBitbucketDriver's fallback delegation to silently swallow errors via unwrap_or_default()/ok().flatten(). Make the trait infallible to match PHP, updating the mechanical Ok(...) wrapping in all implementors. Also narrow attempt_clone_fallback's cleanup to only trigger on RuntimeException, mirroring PHP's catch (\RuntimeException $e), using the same downcast pattern already used by has_composer_file for TransportException.
Diffstat (limited to 'crates/shirabe/src/repository/vcs/vcs_driver_interface.rs')
-rw-r--r--crates/shirabe/src/repository/vcs/vcs_driver_interface.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/repository/vcs/vcs_driver_interface.rs b/crates/shirabe/src/repository/vcs/vcs_driver_interface.rs
index 5d2be04..fb10d0f 100644
--- a/crates/shirabe/src/repository/vcs/vcs_driver_interface.rs
+++ b/crates/shirabe/src/repository/vcs/vcs_driver_interface.rs
@@ -29,9 +29,9 @@ pub trait VcsDriverInterface: std::fmt::Debug {
fn get_tags(&mut self) -> anyhow::Result<IndexMap<String, String>>;
- fn get_dist(&self, identifier: &str) -> anyhow::Result<Option<IndexMap<String, String>>>;
+ fn get_dist(&self, identifier: &str) -> Option<IndexMap<String, String>>;
- fn get_source(&self, identifier: &str) -> anyhow::Result<IndexMap<String, String>>;
+ fn get_source(&self, identifier: &str) -> IndexMap<String, String>;
fn get_url(&self) -> String;