zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.77k stars 123 forks source link

[bug]: zinit update is broken #507

Closed jankatins closed 1 year ago

jankatins commented 1 year ago

What happened?

Up to now I was using zsh -c "source /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh && zinit update --all --parallel" but today that broke. I ran zinit update from an existing console and it worked. But now even that is broken.

Steps to reproduce

run zinit update after updating to the latest commit

Relevant output

λ  zinit update
Assuming --all is passed
[self-update] updating zinit repository
[self-update] fetching latest changes from main branch
...
Updating zsh-users/zsh-syntax-highlighting
The update took 203.10 seconds

λ  zinit update --all --parallel

λ  zinit update

(note that there is no output after the last two)

I ran the above line with set -x inbetween and got this:

...
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit-autoload.zsh.12: ZINIT[EXTENDED_GLOB]=''
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2920: case update (zstatus)
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2920: case update (delete)
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2920: case update (times)
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2920: case update (self-update)
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2920: case update (unload)
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2920: case update (bindkeys)
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2920: case update (update)
0 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2949: ((  0  ))
1 // /Users/jankatins/.local/share/zinit/zinit.git/zinit.zsh.2949: return 1

line 2949 is

(( ${+ICE[if]} )) && { eval "${ICE[if]}" } || return 1

which got touched by a recent commit: https://github.com/zdharma-continuum/zinit/commit/6c82d6788dec6a60c4c217d03c45c327bc0e59a1#diff-475a2f1e35813d9641ea77e854b9bf0d8c36b077bedbb6ae0bde1a0529dbbf0cR2949

I switched it back to

if (( ${+ICE[if]} )) {
                        eval "${ICE[if]}" || return 1;
}

And it worked again (for one run, as it switched that back to the version in the repo)...

Operating System & Version

OS: darwin21.3.0 | Vendor: apple | Machine: x86_64 | CPU: x86_64 | Processor: i386 | Hardware: x86_64

Zsh version

zsh 5.9 (x86_64-apple-darwin21.3.0)

Terminal emulator

wezterm

If using WSL on Windows, which version of WSL

None

Code of Conduct

vladdoster commented 1 year ago

@jankatins See #502

vladdoster commented 1 year ago

Could you open a PR with your fix?

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 3.11.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: