jdx/mise

Backend args (like exe) leak from registry to mise.toml on mise use/upgrade

Closed this issue · 0 comments

Describe the bug
It seems the fix for #2890 or some followup refactor made the args like exe, matching, tag_regex leak into the mise.toml config even if the registry name (like gh instead of ubi:…) is used.

To Reproduce

$ mise use -g gh
$ mise upgrade --bump cargo-binstall

~/.config/mise/config.toml now contains:

[tools]
gh = { version = "2.61.0", exe = "gh" }
cargo-binstall = { version = "1.10.12", tag_regex = '^\d\.' }

and now you can't change those args in the registry any more as they're fixed in the users config…

Expected behavior

[tools]
gh = "2.61.0"
cargo-binstall = "1.10.12"

mise doctor output

version: 2024.11.6 linux-x64 (ac78120 2024-11-10)
activated: no
shims_on_path: yes

build_info:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Sun, 10 Nov 2024 14:47:32 +0000
  Rust Version: rustc 1.82.0 (f6e511eec 2024-10-15)
  Profile: release

shell:
  /bin/bash
  GNU bash, version 5.2.32(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:
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/.cache/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

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

backends:
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  usage  https://github.com/jdx/mise-usage.git#fe3888a

toolset:
  cargo:JojiiOfficial/LiveBudsCli@ref:4a2d75f5bede545738110dccbac033954b1d6087
  cargo:ast-grep@0.28.0
  cargo:cargo-audit@0.21.0
  cargo:cargo-cache@0.8.3
  cargo:cargo-edit@0.13.0
  cargo:cargo-watch@8.5.3
  cargo:ripgrep_all@0.10.6
  cargo:tokio-console@0.1.13
  npm:prettier@3.3.3
  npm:typescript-language-server@4.3.3
  pipx:gdbgui@0.15.2.0
  pipx:git-when-merged@1.2.1
  pipx:liskin/foursquare-swarm-ical@172e1d0336fdab568ab6b5ed505a06daafa5078c
  pipx:liskin/liscopridge@a9c2debe41d045ef184c87bbad331ee6fa20b13c
  pipx:liskin/strava-gear@6883fefc8a8f0a2e5144f271480e406a33540417
  pipx:liskin/strava-offline@1abe986b2d1ba6a300954df6ff648d88bead6c80
  pipx:markdown2ctags@0.3.3
  pipx:pandoc-plantuml-filter@0.1.5
  pipx:pushl@0.3.5
  pipx:python-dxf@12.1.0
  pipx:timezonefinder@6.5.4
  ubi:JohnnyMorganz/StyLua@0.20.0
  ubi:YodaEmbedding/frece@1.0.6
  ubi:ankitpokhrel/jira-cli@1.5.2
  ubi:astral-sh/uv@0.4.29
  ubi:bazelbuild/buildtools@7.3.1
  ubi:evcxr/evcxr@0.17.0
  ubi:kubernetes-sigs/kind@0.22.0
  ubi:oz/tz@0.7.0
  ubi:pkolaczk/fclones@0.34.0
  ubi:rust-analyzer/rust-analyzer@2024-10-21
  ubi:tilt-dev/ctlptl@0.8.35
  ubi:tilt-dev/tilt@0.33.21
  ubi:cargo-bins/cargo-binstall@1.10.12
  ubi:wagoodman/dive@0.12.0
  ubi:cli/cli@2.61.0
  ubi:hadolint/hadolint@2.12.0
  ubi:tamasfe/taplo@0.9.3
  usage@1.2.0
  ubi:watchexec/watchexec@2.2.0

env_vars:
  (none)

settings:
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cache_prune_age = "30d"
  ci = false
  color = true
  debug = false
  disable_backends = []
  disable_default_registry = false
  disable_hints = []
  disable_tools = []
  experimental = true
  fetch_remote_versions_cache = "1h"
  fetch_remote_versions_timeout = "10s"
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = "30s"
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  libgit2 = true
  lockfile = false
  log_level = "info"
  not_found_auto_install = false
  paranoid = true
  pin = true
  pipx_uvx = true
  plugin_autoupdate_last_check_duration = "7d"
  quiet = false
  raw = false
  task_timings = false
  trace = false
  trusted_config_paths = ["~/.config/mise/config.toml"]
  unix_default_file_shell_args = ["sh"]
  unix_default_inline_shell_args = [
      "sh",
      "-c",
  ]
  use_file_shell_for_executable_tasks = false
  use_versions_host = true
  verbose = false
  windows_default_file_shell_args = [
      "cmd",
      "/c",
  ]
  windows_default_inline_shell_args = [
      "cmd",
      "/c",
  ]
  windows_executable_extensions = [
      "exe",
      "bat",
      "cmd",
      "com",
      "ps1",
      "vbs",
  ]
  yes = false

  [cargo]
  binstall = true

  [node]

  [npm]
  bun = false

  [pipx]
  uvx = true

  [python]
  default_packages_file = "~/.default-python-packages"
  pyenv_repo = "https://github.com/pyenv/pyenv.git"
  venv_auto_create = false
  venv_stdlib = false

  [ruby]
  default_packages_file = "~/.default-gems"
  ruby_build_repo = "https://github.com/rbenv/ruby-build.git"
  ruby_install = false
  ruby_install_repo = "https://github.com/postmodern/ruby-install.git"

  [status]
  missing_tools = "always"
  show_env = true
  show_tools = false
No warnings found
No problems found