Logo
Explore Help
Register Sign In
Mirrors/task
1
0
Fork 0
You've already forked task
mirror of https://github.com/go-task/task.git synced 2026-07-10 12:31:40 +02:00
Code Issues Packages Projects Releases Wiki Activity
Files
v2
task/testdata/params/Taskvars.yml

3 lines
53 B
YAML
Raw Permalink Normal View History

Reintroduce template evaluation in variables With a recent commit, template evaluation for variables in tasks got broken. This reindroudces temmplate evaluation in taks, and resolves a series of issues that where previouisly present on master, such as: - Taskvars did not get evaluated as templates. - Taskvars would, in contrast to the documentation, _override_ task variables for the taks called directly via `Executor.Run(args ...string)`. This caused different behaviour in the "default" task v.s. other tasks. This commit ensures: - Priority order for variables is now according to the documentation, also for the "default" task. - Variables gets resolved in a particular order to ensure logical access to varaibles on template compile time, and that template compilation finds place _before_ resolution of dynamic variables. This change also allows the following to work: task: vars: A: "52" B: "{{.A}}" However, the following will always replace C with the uncompiled `{{.A}}`: task: vars: A: "52" C: "{{.B}}" B: "{{.A}}" Several tests have also been added to prevent this feature from breaking again. This should hopefully finally resolve issue #40.
2017-07-20 09:05:37 +02:00
PORTUGUESE_HELLO_WORLD: Olá, mundo!
GERMAN: "Hello"
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 105ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API