aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/package')
-rw-r--r--crates/shirabe/src/package/locker.rs4
-rw-r--r--crates/shirabe/src/package/version/version_selector.rs7
2 files changed, 5 insertions, 6 deletions
diff --git a/crates/shirabe/src/package/locker.rs b/crates/shirabe/src/package/locker.rs
index 59b81b1..47a9974 100644
--- a/crates/shirabe/src/package/locker.rs
+++ b/crates/shirabe/src/package/locker.rs
@@ -966,11 +966,11 @@ impl Locker {
Some(FindPackageConstraint::Constraint(
link.get_constraint().clone(),
)),
- )
+ )?
.is_empty()
{
let results = installed_repo
- .find_packages_with_replacers_and_providers(&link.get_target(), None);
+ .find_packages_with_replacers_and_providers(&link.get_target(), None)?;
if !results.is_empty() {
// PHP `reset($results)` returns the first shared package; clone the handle.
diff --git a/crates/shirabe/src/package/version/version_selector.rs b/crates/shirabe/src/package/version/version_selector.rs
index 31942f9..9e41f97 100644
--- a/crates/shirabe/src/package/version/version_selector.rs
+++ b/crates/shirabe/src/package/version/version_selector.rs
@@ -36,12 +36,11 @@ pub struct VersionSelector {
impl VersionSelector {
pub fn new(
repository_set: RepositorySet,
- platform_repo: Option<&crate::repository::PlatformRepository>,
+ platform_repo: Option<&mut crate::repository::PlatformRepository>,
) -> anyhow::Result<Self> {
let mut platform_constraints: IndexMap<String, Vec<AnyConstraint>> = IndexMap::new();
if let Some(platform_repo) = platform_repo {
- for package in <PlatformRepository as RepositoryInterface>::get_packages(platform_repo)
- {
+ for package in platform_repo.get_packages()? {
let constraint = SimpleConstraint::new(
"==".to_string(),
package.get_version().to_string(),
@@ -95,7 +94,7 @@ impl VersionSelector {
&strtolower(package_name),
constraint.as_ref().map(|c| c.clone()),
repo_set_flags,
- );
+ )?;
let min_priority = *base_package::STABILITIES.get(preferred_stability).unwrap();
candidates.sort_by(|a, b| {