summaryrefslogtreecommitdiffstats
path: root/src/package
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-05-25 15:46:56 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-05-25 16:57:30 +0200
commit45806c89605c155df992c1e5e9917f315e9fa495 (patch)
tree699e0cacbb2bf402761e3ce0f530fab427957958 /src/package
parent2c4306ac8b5c7f0938e04f1056f5fc59d1a6a477 (diff)
Fix: Error out if a dependency cannot be found
This fixes a bug where dependencies were not found, but this was ignored. This happened even if there was a typo in the version of the dependency, for example. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Tested-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/package')
-rw-r--r--src/package/dag.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/package/dag.rs b/src/package/dag.rs
index e7b8dc3..1075dda 100644
--- a/src/package/dag.rs
+++ b/src/package/dag.rs
@@ -53,6 +53,9 @@ impl Dag {
.and_then_ok(|(name, constr)| {
trace!("Dependency for {} {} found: {:?}", p.name(), p.version(), name);
let packs = repo.find_with_version(&name, &constr);
+ if packs.is_empty() {
+ return Err(anyhow!("Dependency of {} {} not found: {} {}", p.name(), p.version(), name, constr))
+ }
trace!("Found in repo: {:?}", packs);
// If we didn't check that dependency already