Description
Description
Now that the ENV_PRECEDENCE
experiment is stable, it's about time we do a review of variables and environment variables and their behavior in Task. There are countless issues related to variables in v3 and we're going to be breaking them in the next major release anyway. This is the perfect time to have a think about whether there is anything else that we want to change.
This thread is a rollup issue (megathread, epic, whatever you want to call it) to discuss all variable-related ideas at a high level (no implementation details) so that we can discuss them together and in the context of a breaking change. Individual changes will be linked as child issues.
Here is a (non-exhaustive) list of the discussions that have been had elsewhere
- Changing PATH env var doesn't seem to work #482
- Precedence of environment variables not respected in v3.20.0 #993
- Variables provided via command line should override ones set in Taskfile.yaml #1006
- Taskfile Scoped Variables #1030
- Idea: Consider having functions to access variables and envs #1065
- env variable should take precedence #1276
- Define ENV vars not static #1630
- Variables from included Taskfiles cannot be overwritten #2108