From 235000c33298fdfde6125e7f70fba4e7bf01cb4d Mon Sep 17 00:00:00 2001 From: jdx <216188+jdx@users.noreply.github.com> Date: Sat, 16 Nov 2024 01:10:08 -0600 Subject: [PATCH] fix: bug with task dependencies --- src/task/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/task/mod.rs b/src/task/mod.rs index 7a65c2d28f..eebadafd42 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -170,14 +170,13 @@ impl Task { } pub fn all_depends<'a>(&self, config: &'a Config) -> Result> { + let tasks = config.tasks_with_aliases()?; let mut depends: Vec<&Task> = self .depends .iter() - .flat_map(|pat| { - match_tasks(&config.tasks_with_aliases().unwrap_or_default(), pat) - .unwrap_or_default() - }) - .collect(); + .map(|pat| match_tasks(&tasks, pat)) + .flatten_ok() + .collect::>>()?; for dep in depends.clone() { depends.extend(dep.all_depends(config)?); }