diff --git a/src/integration.rs b/src/integration.rs index dee834d..4814c7b 100644 --- a/src/integration.rs +++ b/src/integration.rs @@ -1859,3 +1859,22 @@ BAZ +Z: "echo bar: 0\necho foo: 1 2\necho baz: 3 4 5\n", ); } + +#[test] +fn missing_second_dependency() { + integration_test( + &[], + " +x: + +a: x y +", + 255, + "", + "error: Recipe `a` has unknown dependency `y` + | +4 | a: x y + | ^ +", + ); +} diff --git a/src/lib.rs b/src/lib.rs index 2a50448..8645d14 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -589,7 +589,7 @@ impl<'a, 'b> Resolver<'a, 'b> { .cloned().collect() })); } - return self.resolve(dependency); + self.resolve(dependency)?; }, None => return Err(dependency_token.error(ErrorKind::UnknownDependency { recipe: recipe.name,