jdx/mise

Pristine env cannot be read in `env` with `tools=true`

Closed this issue · 0 comments

Describe the bug
In env with tools=true set, the pristine env like HOME is not included.

To Reproduce

[env]
TEST = { value = "{{ exec(command='echo $HOME') }}", tools = true }
TEST2 = { value = "{{ env.HOME }}", tools = true }

TEST will be empty.
If TEST2 exists in the config, mise throws an error:

mise ERROR failed to parse template: '{{ env.HOME }}'
mise ERROR Failed to render '__tera_one_off'
mise ERROR Variable `env.HOME` not found in context while rendering '__tera_one_off'
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information

Expected behavior
TEST and TEST2 are set to $HOME.

mise doctor output

version: 2024.12.13 linux-x64 (c970664 2024-12-17)
activated: yes
shims_on_path: no

build_info:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Tue, 17 Dec 2024 22:05:20 +0000
  Rust Version: rustc 1.83.0 (90b35a623 2024-11-26)
  Profile: release

shell:
  /bin/bash
  GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
  Copyright (C) 2022 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

  This is free software; you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

dirs:
  cache: ~/.cache/mise
  config: ~/.config/mise
  data: ~/.local/share/mise
  shims: ~/.local/share/mise/shims
  state: ~/.local/state/mise

config_files:
  ~/.config/mise/config.toml

backends:
  aqua
  asdf
  cargo
  core
  gem
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  gradle  https://github.com/rfrancis/asdf-gradle.git#3af5633
  pdm     https://github.com/1oglop1/asdf-pdm.git#0223762
  yarn    https://github.com/mise-plugins/asdf-yarn.git#74ea3b9

toolset:
  aqua:BurntSushi/ripgrep@14.1.1
  aqua:astral-sh/uv@0.5.10
  aqua:biomejs/biome@1.9.5-nightly.81fdedb
  aqua:cargo-bins/cargo-binstall@1.10.17
  aqua:cli/cli@2.63.2
  aqua:ducaale/xh@0.23.0
  aqua:jqlang/jq@1.7.1
  aqua:junegunn/fzf@0.56.3
  aqua:kellyjonbrazil/jc@1.25.4
  aqua:pnpm/pnpm@9.15.0
  aqua:sharkdp/fd@10.2.0
  aqua:sigstore/cosign@2.4.1
  aqua:x-motemen/ghq@1.7.1
  asdf:gradle@8.11.1
  asdf:yarn@4.5.3
  cargo:eza@0.20.10
  core:bun@1.1.40
  core:go@1.23.4
  core:java@23.0.1
  core:node@23.4.0
  core:python@3.13.1
  core:rust@1.83.0
  ubi:dandavison/delta@0.18.2
  ubi:jdx/usage@1.6.0
  ubi:sharkdp/bat@0.24.0
  ubi:slsa-framework/slsa-verifier@2.6.0

Additional context