mise icon indicating copy to clipboard operation
mise copied to clipboard

`mise set` to get values of env vars no longer works

Open andrew-unfurl opened this issue 2 months ago • 1 comments

Describe the bug The docs say that we should be able to fetch values of env vars by key, using mise set <key>. In version 11.0 I could do this. After upgrading to 11.36 I cannot. Turns out it's only happening for my var in a .mise.local.toml file.

$ mise set key value source ENV dev ~/git/unfurl/webapp/.mise.toml ANOTHER_VAR test ~/git/unfurl/webapp/.mise.local.toml

$ mise set ENV dev

$ mise set ANOTHER_VAR mise ERROR Environment variable ANOTHER_VAR not found mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information

mise doctor output

version: 2024.11.36 macos-arm64 (0461143 2024-11-29)
activated: no
shims_on_path: yes

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Fri, 29 Nov 2024 10:31:21 +0000
  Rust Version: rustc 1.82.0 (f6e511eec 2024-10-15)
  Profile: release

shell:
  /bin/zsh
  zsh 5.9 (x86_64-apple-darwin23.0)

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

config_files:
  ~/.config/mise/config.toml
  ~/git/unfurl/webapp/.mise.toml
  ~/git/unfurl/webapp/.mise.local.toml

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

plugins:
  jq    https://github.com/mise-plugins/asdf-jq.git#6d86d19
  pnpm  https://github.com/jonathanmorley/asdf-pnpm.git#305baff

toolset:
  asdf:[email protected]
  asdf:[email protected]
  core:[email protected]

env_vars:
  (none)

settings:
  experimental  true ~/.config/mise/config.toml

No problems found

Additional context I tried with and without setting experimental to true. I tried with activated vs shims_on_path.

Add any other context about the problem here. Consider running mise with --debug or --trace for extra debug info.

andrew-unfurl avatar Nov 29 '24 17:11 andrew-unfurl