Skip to content

Commit

Permalink
fix: bug with task dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Nov 16, 2024
1 parent e02e48f commit 235000c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,13 @@ impl Task {
}

pub fn all_depends<'a>(&self, config: &'a Config) -> Result<Vec<&'a Task>> {
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::<Result<Vec<_>>>()?;
for dep in depends.clone() {
depends.extend(dep.all_depends(config)?);
}
Expand Down

0 comments on commit 235000c

Please sign in to comment.