You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since version 3.2.0 (and #384), task executes the dynamic variable commands (set with sh: bash ...) in the directory of the task they are used in. This is even the case if they are declared globally (-> not in a specific task).
Previously, they were executed in the current directory.
Intuitively, I'd say global variables should be set either in the current directory for global ones and variables which are set at task-level should be executed in the directory of the task.
I think it depends how one understands those dynamic variables: Are they intended to be used as "insert specified command here" or as variable which will be set at runtime? For me, dynamic variable means the latter.
Nevertheless, it was possible to use VERSION: {sh: "bash {{ .PWD }}/scripts/version.sh"} to still make it work somehow. (Instead of defining the relative path for each task where it is used)
Since version 3.2.0 (and #384), task executes the dynamic variable commands (set with
sh: bash ...
) in the directory of the task they are used in. This is even the case if they are declared globally (-> not in a specific task).Previously, they were executed in the current directory.
Intuitively, I'd say global variables should be set either in the current directory for global ones and variables which are set at task-level should be executed in the directory of the task.
I think it depends how one understands those dynamic variables: Are they intended to be used as "insert specified command here" or as variable which will be set at runtime? For me,
dynamic variable
means the latter.Nevertheless, it was possible to use
VERSION: {sh: "bash {{ .PWD }}/scripts/version.sh"}
to still make it work somehow. (Instead of defining the relative path for each task where it is used)Example Taskfile showing the issue
The text was updated successfully, but these errors were encountered: