Skip to content

Conversation

trulede
Copy link
Contributor

@trulede trulede commented Sep 12, 2025

A deferred task was recalculating vars which results in re-evaluation of templated and sh vars. This might not be desired in the case where values change with each evaluation; e.g. template function randInt.

This PR passes the task Vars to the deferred task, and removes the code which previously re-evaluated the vars. This works and I do not notice any point in the code where the task Vars would be mutilated (changed) so I did not use the DeepCopy() function of the Vars object when calling runDeferred(). I think this will be OK, but I would still review that part again.

fixes #2244

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variable definitions are re-evaluated in deferred cmds
1 participant