Closed awkure closed 6 months ago
I see the issue. will check more...
by the way this is not considered command line DOCKER_IMAGE_TAG=command-line cargo make current_env
command like are via env key on the cargo make cli. while what you did is set it as an env BEFORE cargo make is invoked and is considered current machine env
wwait... everything works as per the docs.
Load environment file provided on the command line you didn't provide any
Setup internal environment variables (see Global section). Does not per-task variables. not relevant
Load global environment files defined in the env_files attribute. DOCKER_IMAGE_TAG = file is loaded
Load global environment variables provided on the command line. you didn't provide any
Load global environment variables defined in the env block and relevant sub env blocks based on profile/additional profiles. DOCKER_IMAGE_TAG = "inner" is now loaded and overwrites the env file
order is not priority. order is order. when things get loaded. naturally last loaded overwrites first loaded.
i'll be closing this issue but if you don't agree or i misunderstood, please reopen.
Describe The Bug
As per project README we have the following evaluation order of env variables
Where command line env variables have the highest priority, and the ones loaded from
env_files
are of higher priority, than the ones, defined in the[env]
block. In reality the situation is of the reverse order.To Reproduce
If you try using this
Makefile.toml
with
you get
And commenting out
[env]
The priority goes to the env file