feat: add global preconditions at the taskfile level by drichardson · Pull Request #2734 · go-task/task
and others added 2 commits
March 9, 2026 16:17Adds a top-level `preconditions` key to Taskfiles that applies to all tasks. Preconditions from a parent taskfile are inherited by tasks in included taskfiles (propagated downward through the include hierarchy). Closes go-task#294 Assisted by AI Co-Authored-By: Claude <noreply@anthropic.com>
Extends global preconditions with two new fields: - `inherit: bool` on a precondition: when true, the precondition propagates to tasks in included Taskfiles (transitively). Defaults to false, so preconditions are file-scoped by default. - `skip_preconditions: bool` on a task: when true, the task does not receive preconditions inherited from parent Taskfiles. Global preconditions defined in the same file as the task still apply. Has no effect on root-level tasks. Assisted by AI Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters