Skip to content

Commit ebd880f

Browse files
committed
fix(task): avoid redundant missing-task load
1 parent fa61aff commit ebd880f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/task/task_list.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ async fn tasks_for_missing_task_error(
108108
config: &Config,
109109
name: &str,
110110
) -> Result<(Arc<BTreeMap<String, Task>>, bool)> {
111-
let tasks = config.tasks().await?;
112-
113111
// In monorepos, users usually need `tasks ls --all` after a miss. Load that
114112
// same view for the error so sibling package tasks can be suggested.
115113
if (name.starts_with("//") || config.is_monorepo())
@@ -121,6 +119,7 @@ async fn tasks_for_missing_task_error(
121119
return Ok((all_tasks, true));
122120
}
123121

122+
let tasks = config.tasks().await?;
124123
Ok((tasks, false))
125124
}
126125

0 commit comments

Comments
 (0)