I suspect that this is related to the newly merge task level dotenv support.
What I am seeing that environment variables specified explicitly at the task level no longer take precedence over ones defined by dotenv. For example, given a Taskfile of the form:
# dotenv file exports a `DATABASE_NAME` env var
dotenv: ['.env', '{{.HOME}}/.adapt.env']
task generate:config:
env:
DATABASE_NAME: "whatever"
cmds:
- echo "${DATABASE_NAME}"
You will always get the value of DATABASE_NAME defined by dotenv rather than the override defined at the local task level
- Task version: v3.20.0
- Operating System: macOS Ventura