jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.39k stars 263 forks source link

Mise interfering with kitty ssh kitten #2484

Open chancez opened 1 month ago

chancez commented 1 month ago

Describe the bug When using the kitty ssh kitten feature https://sw.kovidgoyal.net/kitty/kittens/ssh/ it creates a stub file on the remote host at $HOME.local/share/kitty-ssh-kitten/kitty/bin and appends that directory to the $PATH when starting the shell on the remote host. However when using mise, it seems that the update to the $PATH is lost somewhere.

If I env | grep -I kitty, I see:

__MISE_ORIG_PATH=/home/chance/.local/bin:/home/chance/.local/custom_bins:/home/chance/.krew/bin:/home/chance/.cargo/bin:/home/chance/go/bin:/snap/bin:/usr/local/bin:/usr/local/sbin:/usr/local/opt/curl/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/chance/.local/share/kitty-ssh-kitten/kitty/bin

So I can tell the the PATH was updated, but mise dropped it somewhere along the way.

To Reproduce

Expected behavior

Mise should preserve the updated PATH from kitty.

mise doctor output

 chance@white ~ ❯❯❯ mise doctor
version: 2024.8.9 linux-x64 (221285d 2024-08-18)
activated: yes
shims_on_path: no

build_info: 
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Sun, 18 Aug 2024 19:01:35 +0000
  Rust Version: rustc 1.80.1 (3f5fd8dd4 2024-08-06)
  Profile: release

shell: 
  /bin/zsh
  zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

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
  ~/.mise.toml

backends: 
  cargo
  core
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins: 
  kubectl    ssh://git@github.com/asdf-community/asdf-kubectl.git#cbe6df4
  neovim     ssh://git@github.com/richin13/asdf-neovim.git#d6118ad
  rust       ssh://git@github.com/code-lever/asdf-rust.git#95acf4f
  terraform  ssh://git@github.com/asdf-community/asdf-hashicorp.git#f1602b6
  usage      ssh://git@github.com/jdx/mise-usage.git#fe3888a

toolset: 
  neovim@0.10.1         
  node@20.16.0          
  node@20.16.0          
  node@19.9.0           
  node@18.20.4          
  node@17.9.1           
  node@16.20.2          
  python@3.10.14        
  python@2.7.18         
  go@1.23.0             
  terraform@1.4.6       
  java@20.0.2           
  kubectl@1.28.13       
  ruby@3.1.6            
  npm:jwt-cli@2.0.0     
  go:github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1  
  usage@0.3.0           

env_vars: 
  MISE_SHELL=zsh

settings: 
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf = true
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  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 = 30
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  libgit2 = true
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_default_packages_file = "~/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  vfox = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
1 problem found:

1. new mise version 2024.8.12 available, currently on 2024.8.9

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

I'm using mise activate and also mise hook-env: https://github.com/chancez/dotfiles/blob/master/zsh/.zshrc#L164 but I'm testing adding the shims to my $PATH and it seems to work? Not sure what the trade-off here might be.