-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variables in [env]
block not accessible in templates with env
or get_env
#3701
Labels
Comments
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
jdx
added a commit
that referenced
this issue
Dec 19, 2024
miguelmig
pushed a commit
to miguelmig/mise
that referenced
this issue
Dec 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I'm trying to rewrite some of our Make targets to use Mise tasks, but I'm having trouble with environment variables. It doesn't matter if I set the variable explicitly in the
[env]
block in the config file, specify it via a.env
file set inenv._.file
, or export it in a shell file specified inenv._.source
. The issue is the same. I can't access the variable in templates using theenv
object or theget_env
function. However, if I use the same variable as a bash variable (like$FOO
) in a task, it works without any issues.To Reproduce
Example 1: task
Result of
mise run bar
:Example 2: tool version
In this situation mise is broken and even
mise doctor
returnsExpected behavior
Variables set in the
[env]
block, a.env
file (usingenv._.file
), or a shell file (usingenv._.source
) should be available in templates. They should work with theenv
object and theget_env
function, no matter how they are defined.mise doctor
outputAdditional context
Add any other context about the problem here. Consider running mise with
--debug
or--trace
for extra debug info.Output of
mise doctor -vv
when used{{ env.VERSION_CONTROLLER_GEN }}
as a tool version:The text was updated successfully, but these errors were encountered: