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
I have a situation where I have a Taskfile that is including another Taskfile (potentially more than one) and I am noticing that if you set any variables in the root of the included Taskfile, they are available and set in the parent Taskfile that is doing the including.
Is this expected behavior?
The reason I am attempting to do this is that I want to have a Taskfile that will be included in multiple repos (using the remote Taskfile experimental capability) and I have a bunch of tasks that need to take in a common set of variables, which are generated based on the values being passed in from the main Taskfile when doing the include.
The problem is, this value gets set globally so if I include that Taskfile again, both included Taskfiles end up having the same values and it is impossible to override (or so it seems).
Am I missing something? Is there another way to do this? I attempted to use dynamic variables, which does end up working) but then have to create a task to generate the value I want to use and also make that task not internal in order to let the remove variable call it to set its value.
Thanks everyone and I just wanted to say that other than this one issue everything have worked flawlessless for me! Love this project and big thanks to the team!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I have a situation where I have a Taskfile that is including another Taskfile (potentially more than one) and I am noticing that if you set any variables in the root of the included Taskfile, they are available and set in the parent Taskfile that is doing the including.
Is this expected behavior?
The reason I am attempting to do this is that I want to have a Taskfile that will be included in multiple repos (using the remote Taskfile experimental capability) and I have a bunch of tasks that need to take in a common set of variables, which are generated based on the values being passed in from the main Taskfile when doing the include.
The problem is, this value gets set globally so if I include that Taskfile again, both included Taskfiles end up having the same values and it is impossible to override (or so it seems).
Am I missing something? Is there another way to do this? I attempted to use dynamic variables, which does end up working) but then have to create a task to generate the value I want to use and also make that task not internal in order to let the remove variable call it to set its value.
Thanks everyone and I just wanted to say that other than this one issue everything have worked flawlessless for me! Love this project and big thanks to the team!
Beta Was this translation helpful? Give feedback.
All reactions