zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
2.95k stars 126 forks source link

zinit self-update can't find git-process-output.zsh #423

Closed meangrape closed 1 year ago

meangrape commented 1 year ago

What happened?

zinit self-update emits the following error:

fatal: couldn't find remote ref main
[self-update] compiling zinit via zcompile
.zinit-self-update:zcompile:42: can't open file: /opt/homebrew/opt/zinit/share/git-process-output.zsh

The file git-process-output.zsh exists in /opt/homebrew/opt/zinit/share/share and not /opt/homebrew/opt/zinit/share

Steps to reproduce

zinit self-update

Relevant output

.
.
.
2022-11-08 9423e7824 build(deps): bump zeitwerk from 2.6.4 to 2.6.6 in /Library/Homebrew | Bumps [zeitwerk](https://github.com/fxn/zeitwerk) from 2.6.4 to 2.6.6.
- [Release notes](https://github.com/fxn/zeitwerk/releases)
- [Changelog](https://github.com/fxn/zeitwerk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fxn/zeitwerk/compare/v2.6.4...v2.6.6)
---
updated-dependencies:
- dependency-name: zeitwerk
  dependency-type: indirect
  update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 c33b5b257 Merge pull request #14118 from Homebrew/sponsors-maintainers-man-completions | Update manpage and completions.
2022-11-08 89b3bb83f Update manpage and completions. | Autogenerated by the [sponsors-maintainers-man-completions](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/sponsors-maintainers-man-completions.yml) workflow.
2022-11-08 68b944a94 Merge pull request #14112 from hyuraku/move-two-methods-to-utils/github | move two methods from download_strategy to utils/github
2022-11-08 8ce692cab Merge pull request #14117 from hyuraku/add-manpages.rb | Add manpages.rb
2022-11-08 20c67b1b2 repair style
2022-11-08 55de5deb0 fix typo

fatal: couldn't find remote ref main
[self-update] compiling zinit via zcompile
.zinit-self-update:zcompile:42: can't open file: /opt/homebrew/opt/zinit/share/git-process-output.zsh
[self-update] reloading zinit for the current session

Screenshots and recordings

No response

Operating System & Version

OS: darwin21.4.0 | Vendor: apple | Machine: arm | CPU: arm64 | Processor: arm | Hardware: arm64

Zsh version

zsh 5.9.0.1-dev (arm-apple-darwin21.4.0)

Terminal emulator

screen-256color

If using WSL on Windows, which version of WSL

No response

Additional context

No response

Code of Conduct

vladdoster commented 1 year ago

Howdy,

Similar issue discussed in #408.

fatal: couldn't find remote ref main [self-update] compiling zinit via zcompile .zinit-self-update:zcompile:42: can't open file: /opt/homebrew/opt/zinit/share/git-process-output.zsh [self-update] reloading zinit for the current session

This is caused by the switch made a while back where master was renamed main.

And it appears something funky happened to your installation where it has nested share/.

See share/git-process-output.zsh

Additionally, I haven't (IIRC) updated the formula to account for the different Brew prefix on ARM (i.e., Apple silicon). However, this shouldn't matter.


Try this:

brew uninstall --force zinit \
&& brew install --force --HEAD --fetch-HEAD zinit \
&& exec zsh -il

Tangential:

Cool to see a Harvard colleague (worked on DevOps team @ HMS Research Computing for 2.5 years) using Zinit 👍🏻!

meangrape commented 1 year ago

brew uninstall --force zinit definitely removes everything.

brew install --force --HEAD --fetch-HEAD zinit results in the nested share/share dirs.

==> Cloning https://github.com/zdharma-continuum/zinit.git
Cloning into '/Users/jayed/Library/Caches/Homebrew/zinit--git'...
==> Checking out branch main
Already on 'main'
Your branch is up to date with 'origin/main'.
==> Caveats
To activate zinit, add the following to your ~/.zshrc:
  source /opt/homebrew/opt/zinit/zinit.zsh
==> Summary
/opt/homebrew/Cellar/zinit/HEAD-64fa4ae: 53 files, 931.8KB, built in 4 seconds
==> Running `brew cleanup zinit`...
[jayed@merlot ~]  ls -al /opt/homebrew/opt/zinit/share/share                                                                                               
total 32
drwxr-xr-x  6 jayed  staff   192 Nov 25 16:52 ./
drwxr-xr-x  4 jayed  admin   128 Nov 25 16:52 ../
-rwxr-xr-x  1 jayed  staff  6076 Nov 25 16:52 git-process-output.zsh*
-rwxr-xr-x  1 jayed  staff  1779 Nov 25 16:52 rpm2cpio.zsh*
drwxr-xr-x  4 jayed  staff   128 Nov 25 16:52 template-plugin/
-rw-r--r--  1 jayed  staff  1771 Nov 25 16:52 zsh.ctags

(Hi, Harvard buddy! :wave:)