pd93
dotenv merges in inverse order?
I agree that this seem counterintuitive. The docs don't mention precedence, so I'm not sure if this was intended or not. The introduction of
dotenv
predates my time as a maintainer. Maybe @andreynering knows.
The problem with changing this now is that it would probably break many people's Taskfiles. It's something that we could potentially look into changing for a future major version though if it is decided that this is incorrect6 replies
Is this the best way to create a list (that can be empty) for use with templates?
You could use
compact
instead of initial
. This would remove any empty items from your array. Alternatively, you can build a JSON string and call fromJson
. There are probably other ways too.
Regarding ref
. By design, it only accepts a single ActionNode
(i.e. One set of {{...}}
) so if
statements are not possible. ref
is designed for you to be able to refer to other variables while maintaining their type, not for logic. It is actually a side-effect of the templating engine that functions are available for use in ref
, but we felt this was acceptable/useful.3 replies
Working out why a task with sources and generates is considered up to date
The generated hash is stored in the
.task
directory. However, there is no way to see which files this hash represents. The behaviour that you're describing shouldn't be happening though. I created a full example similar to yours that seems to work fine
3 replies