Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mise auto-updating plugins command during self-update incorrect #1467

Closed
mehalter opened this issue Jan 16, 2024 · 2 comments · Fixed by #1472
Closed

Mise auto-updating plugins command during self-update incorrect #1467

mehalter opened this issue Jan 16, 2024 · 2 comments · Fixed by #1472
Labels
bug Something isn't working

Comments

@mehalter
Copy link

Describe the bug
When running mise self-update it automatically tries to auto-update plugins (unless you include --no-plugins). When running mise self-update after it updates or detects no updates I get a "Permission denied (os error 13)" error. When running with verbosity I get:

[DEBUG] $ /home/mhalter3@icl.gtri.org/.local/share/mise/bin plugins update

It looks like when it is going to run plugins update it is calling it on the path to where mise is installed but forgetting to add the executable name. The directory does not have executable permissions which is why I get a Permission denied.

To Reproduce

  1. Run mise self-update (without the --no-plugins flag)
  2. See the error

Expected behavior

mise should properly auto-update plugins when doing a self update

mise doctor output

mise version:
  2024.1.21 linux-x64 (b7e61d6 2024-01-15)

build:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Mon, 15 Jan 2024 16:47:49 +0000
  Rust Version: rustc 1.75.0 (82e1608df 2023-12-21)
  Profile: release

shell:
  /usr/bin/zsh
  zsh 5.8 (x86_64-redhat-linux-gnu)

mise data directory:
  /home/mhalter3@icl.gtri.org/.local/share/mise

mise environment variables:
  MISE_HOME=/home/mhalter3@icl.gtri.org/.local/share/mise
  MISE_BIN=/home/mhalter3@icl.gtri.org/.local/share/mise/bin
  MISE_SHELL=zsh

settings:
  {
    "activate_aggressive": false,
    "all_compile": false,
    "always_keep_download": false,
    "always_keep_install": false,
    "asdf_compat": false,
    "cargo_binstall": true,
    "color": true,
    "disable_default_shorthands": false,
    "disable_tools": [],
    "experimental": true,
    "jobs": 4,
    "legacy_version_file": true,
    "legacy_version_file_disable_tools": [],
    "node_compile": false,
    "not_found_auto_install": true,
    "paranoid": false,
    "plugin_autoupdate_last_check_duration": "7d",
    "python_compile": false,
    "python_default_packages_file": "/home/mhalter3@icl.gtri.org/.default-python-packages",
    "python_patch_url": null,
    "python_precompiled_os": null,
    "python_patches_directory": null,
    "python_precompiled_arch": null,
    "python_pyenv_repo": "https://github.com/pyenv/pyenv.git",
    "python_venv_auto_create": false,
    "raw": false,
    "shorthands_file": null,
    "task_output": null,
    "trusted_config_paths": [],
    "quiet": false,
    "verbose": false,
    "yes": false,
    "ci": false,
    "cd": null,
    "debug": false,
    "env_file": null,
    "trace": false,
    "log_level": "info"
  }

config files:
  ~/.config/mise/config.toml

plugins:
  ag            https://github.com/koketani/asdf-ag.git#3a3e2b3
  bat           https://gitlab.com/wt0f/asdf-bat.git#d5a4f38
  bottom        https://github.com/carbonteq/asdf-btm.git#fd8a55a
  bun           (core)
  cloudflared   https://github.com/threkk/asdf-cloudflared#ef14b31
  cmake         https://github.com/asdf-community/asdf-cmake.git#d631481
  delta         https://github.com/andweeb/asdf-delta.git#501318b
  deno          (core)
  erlang        (core)
  exa           https://github.com/nyrst/asdf-exa.git#6d6f9e2
  fd            https://gitlab.com/wt0f/asdf-fd.git#201dc8b
  fzf           https://github.com/kompiro/asdf-fzf.git#d19eb67
  go            (core)
  hyperfine     https://github.com/volf52/asdf-hyperfine.git#6e64a91
  java          (core)
  jq            https://github.com/lsanwick/asdf-jq.git#addae51
  julia         https://github.com/rkyleg/asdf-julia.git#08ddbff
  lazygit       https://github.com/nklmilojevic/asdf-lazygit.git#78e04f1
  neovim        https://github.com/richin13/asdf-neovim.git#0b7b611
  node          (core)
  pnpm          https://github.com/jonathanmorley/asdf-pnpm.git#305baff
  python        (core)
  ripgrep       https://gitlab.com/wt0f/asdf-ripgrep.git#e836665
  ruby          (core)
  rust          https://github.com/code-lever/asdf-rust.git#95acf4f
  stylua        https://github.com/jc00ke/asdf-stylua.git#d8c9762
  tokei         https://github.com/gasuketsu/asdf-tokei.git#d127410
  zoxide        https://github.com/nyrst/asdf-zoxide#8ed95c9

toolset:
  bat@latest, bottom@latest, cloudflared@latest, cmake@latest, delta@latest, exa@latest, fd@latest, fzf@latest, go@latest, hyperfine@latest, jq@latest, julia@1, lazygit@latest, neovim@nightly, node@20, pnpm@latest, ripgrep@latest, stylua@latest, tokei@latest, zoxide@latest

No problems found
@mehalter mehalter added the bug Something isn't working label Jan 16, 2024
@mehalter
Copy link
Author

It looks like this is because mise relies on MISE_BIN. Is this documented anywhere? This was an environment variable that I use to identify the bin folder of mise. I have just removed this from my workflow/configuration and it's working fine. It seems like maybe this should be documented somewhere what environment variables are reserved for mise to function correctly.

@jdx
Copy link
Owner

jdx commented Jan 16, 2024

I should probably reserve __MISE_* and document that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants