You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Environment variables defined in TOML tasks are not accessible in templates via the env object or the get_env function, but they are available as regular Bash environment variables. For example, when using the following mise.toml:
The variable BAR defined in the task's env is visible to the shell as a regular environment variable but is not accessible in the template via {{ env.BAR }} or {{ get_env('BAR') }}.
To Reproduce
Use the mise.toml configuration provided above.
Run mise run foo.
Observe that {{ env.BAR }} and {{ get_env('BAR') }} in the run template are not rendered and default to undefined, while $BAR is correctly available as a Bash environment variable.
Expected behavior
Environment variables defined in a task's env should be accessible in templates using env.BAR or get_env('BAR').
bartsmykla
changed the title
task-specific (TOML) env vars unavailable in templates but accessible as shell vars
task-specific env vars unavailable in templates but accessible as shell vars
Dec 21, 2024
Describe the bug
Environment variables defined in TOML tasks are not accessible in templates via the
env
object or theget_env
function, but they are available as regular Bash environment variables. For example, when using the followingmise.toml
:When I run
mise run foo
, the results are as follows:The variable
BAR
defined in the task'senv
is visible to the shell as a regular environment variable but is not accessible in the template via{{ env.BAR }}
or{{ get_env('BAR') }}
.To Reproduce
mise.toml
configuration provided above.mise run foo
.{{ env.BAR }}
and{{ get_env('BAR') }}
in therun
template are not rendered and default toundefined
, while$BAR
is correctly available as a Bash environment variable.Expected behavior
Environment variables defined in a task's
env
should be accessible in templates usingenv.BAR
orget_env('BAR')
.mise doctor
outputThe text was updated successfully, but these errors were encountered: