task/cmd
Valentin Maerten 9b95e758f4
fix: cli variables should take priority over aaskfile defaults (#2589)
When using `task FOO=bar` with a Taskfile containing
`FOO: '{{.FOO | default "foo"}}'`, the CLI value was being
overwritten by the Taskfile default.

Split the variable merging into two steps:
1. Merge CLI variables (FOO=bar) first so they override Taskfile vars
2. ReverseMerge special variables (CLI_ARGS, CLI_FORCE, etc.) so
   they're available for templating in Taskfile vars

Fixes regression introduced in #2403.

Co-authored-by: Timothy Rule <timothy.rule@gmail.com>
2025-12-18 17:50:00 -03:00
..
release fix(release): wrap changelog with v-pre directive (#2526) 2025-11-29 11:05:37 +01:00
sleepit fix: typos in docs, changelog, testdata, comments (#1910) 2024-11-07 13:25:59 -03:00
task fix: cli variables should take priority over aaskfile defaults (#2589) 2025-12-18 17:50:00 -03:00