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 run broken with zsh since v2024.11.33 #3280

Closed
hverlin opened this issue Nov 29, 2024 · 6 comments · Fixed by #3282
Closed

mise run broken with zsh since v2024.11.33 #3280

hverlin opened this issue Nov 29, 2024 · 6 comments · Fixed by #3282
Labels

Comments

@hverlin
Copy link
Contributor

hverlin commented Nov 29, 2024

Describe the bug
Something seems to be broken in the latest releases with mise and zsh.

To Reproduce

❯ mise run lint-fix -v 
...
DEBUG config: ~/.config/mise/config.toml
DEBUG EnvResults
[lint-fix] $ node --run lint-fix 
DEBUG $ zsh node --run lint-fix
zsh: can't open input file: node --run lint-fix

Expected behavior

mise doctor output

❯ mise doctor
version: 2024.11.34 macos-arm64 (90f5798 2024-11-29)
activated: yes
shims_on_path: no

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Fri, 29 Nov 2024 07:08:52 +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
...
env_vars:
  MISE_SHELL=zsh

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

Additional context
Seems that using

MISE_SHELL='zsh -c' mise run <task>

fixes it

otherwise, downgrading to previous version is another solution

curl https://mise.run | MISE_VERSION=v2024.11.32 sh
@hverlin hverlin added the bug label Nov 29, 2024
@jdx
Copy link
Owner

jdx commented Nov 29, 2024

I can't seem to reproduce, what's the task doing?

@hverlin
Copy link
Contributor Author

hverlin commented Nov 29, 2024

The task just calls node --run <> but it happens for any tasks (or even mise hooks). They will fail unless I override the MISE_SHELL variable.

[tasks.echo]
run = 'echo "test"'
❯ mise run echo
[echo] $ echo "test" 
zsh: can't open input file: echo "test"
[echo] ERROR task failed
❯ mise settings ls
Key           Value Source
experimental  true  ~/.config/mise/config.toml

If I don't activate mise, it works

❯ ~/.local/bin/mise run echo
[echo] $ echo "test"
test

@hverlin
Copy link
Contributor Author

hverlin commented Nov 29, 2024

This is unrelated, but I saw this message a few times when opening a new shell following the latest release: mise WARN Failed to deserialize __MISE_WATCH wrong msgpack marker FixMap(2)

@jdx
Copy link
Owner

jdx commented Nov 29, 2024

in that case I suspect you have 2 different versions of mise running

jdx added a commit that referenced this issue Nov 29, 2024
@jdx jdx closed this as completed in 9454d0a Nov 29, 2024
@gslin
Copy link

gslin commented Nov 29, 2024

Same mise WARN Failed to deserialize __MISE_WATCH wrong msgpack marker FixMap(2) message here.
According to jdx's hint, this may be caused by:

  1. I have installed mise via apt on Ubuntu.
  2. I have been running tmux, so both parent shell and child shells call mise's initialization function eval "$(mise activate zsh)". And it seems screen will cause same issue here.
  3. Then I upgrade mise via apt, which causes conflict between old/new versions, and now I can see warning message about __MISE_WATCH.

I restart tmux cleanly (including restarting terminal itself) and things go well afterwards.

@hverlin
Copy link
Contributor Author

hverlin commented Nov 29, 2024

I can confirm that the issue has been resolved since the latest release. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants