In dynamic (shell) variables, template expansion resulting in an empty (no characters) script block causes type error when referenced #1903
Labels
area: variables
Changes related to variables.
Sample taskfile showcasing the bug:
Explanation
When a
sh:
block becomes completely empty after template expansion and its value is referenced later, Task throws a type error instead of treating it as an empty string.Workaround
The workaround is to ensure any character always remains in the script block. For instance, a
#
could be added, or whitespace trimming- }}
could be omited.The text was updated successfully, but these errors were encountered: