Valentin Maerten e05c9f7793 fix(compiler): CLI vars have highest priority in scoped mode
In scoped mode, CLI vars (e.g., `task foo VAR=value`) now correctly
override task-level vars. This is achieved by:

1. Adding a `CLIVars` field to the Compiler struct
2. Storing CLI globals in this field after parsing
3. Applying CLI vars last in scoped mode to ensure they override everything

The order of variable resolution in scoped mode is now:
1. OS env → {{.env.XXX}}
2. Root taskfile env → {{.env.XXX}}
3. Root taskfile vars → {{.VAR}}
4. Include taskfile env/vars (if applicable)
5. IncludeVars (vars passed via includes: section)
6. Task-level vars
7. CLI vars (highest priority)

Legacy mode behavior is unchanged.
2026-01-25 19:54:04 +01:00
2025-09-23 22:34:43 +00:00
2025-05-01 18:43:43 +01:00
2025-12-18 17:41:54 +01:00
2025-04-19 12:55:22 +01:00
2024-09-02 19:21:53 +00:00
2026-01-24 20:48:51 -03:00
2026-01-24 20:48:51 -03:00
2024-08-14 08:37:05 -05:00
2025-09-11 10:26:59 +01:00
2017-02-28 09:15:25 -03:00
2025-11-19 10:02:58 -03:00
2025-01-18 10:11:00 -03:00

Task

Task is a task runner / build tool that aims to be simpler and easier to use than, for example, GNU Make.

Installation | Getting Started | Docs | Twitter | Bluesky | Mastodon | Discord

Gold Sponsors

Description
A task runner / simpler Make alternative written in Go
Readme MIT 47 MiB
Languages
Go 88%
Shell 5.1%
TypeScript 2.9%
Vue 1.8%
PowerShell 1.5%
Other 0.6%