zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
3.18k stars 129 forks source link

[bug]: cannot stat 'path/to/zinit/doc/zinit.1' #418

Open chunleng opened 2 years ago

chunleng commented 2 years ago

What happened?

After installing zinit 3.8.0 the following line appears

cp: /opt/homebrew/Cellar/zinit/3.8.0/doc/zinit.1: No such file or directory

Steps to reproduce

  1. Remove ~/.zinit folder
  2. Use zshrc with just source /opt/homebrew/Cellar/zinit/*/zinit.zsh
  3. Start zsh

Relevant output

cp: /opt/homebrew/Cellar/zinit/3.8.0/doc/zinit.1: No such file or directory

Screenshots and recordings

No response

Operating System & Version

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

Zsh version

zsh 5.8 (x86_64-apple-darwin21.0)

Terminal emulator

xterm-kitty

If using WSL on Windows, which version of WSL

No response

Additional context

No response

Code of Conduct

vladdoster commented 2 years ago

Mhm, It is a bug in the formulae.

https://github.com/Homebrew/homebrew-core/blob/471af5646d50097945a5f403d6908226baa1122e/Formula/zinit.rb#L21

chunleng commented 2 years ago

The formulae just update the version it seems, maybe something changed in this update that needs to update to the formula

https://github.com/Homebrew/homebrew-core/commit/6fde9e798c51bcbe61da74c9df10b8bcfa2a2693

altern8tif commented 2 years ago

I think PR #380 broke it...

alichtman commented 2 years ago

The homebrew formula looks fine to me. It downloads https://github.com/zdharma-continuum/zinit/archive/refs/tags/v3.8.0.tar.gz, which does contain doc/zinit.1. Don't know what's going on here. Shouldn't have merged that PR so fast.

vladdoster commented 2 years ago

@chunleng Again, it is a bug in the formula. But I forgot to say what it was.

The bug is here

man1.install "doc/zinit.1"

It moves (NOT copy) zinit.1 to Brew managed manpage collection, which is why it can't find the file.

vladdoster commented 2 years ago

I could not update the formula because Homebrew requires the respective project to have a release within the last year, which Zinit had not.

ghost commented 2 years ago

I thought I would chime in to provide a quick fix:

ln -s "$(man --path zinit)" "$(brew --prefix)/opt/zinit/doc/zinit.1"
github-actions[bot] commented 1 year ago

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

The release is available on GitHub release

Your semantic-release bot :package::rocket:

Tomcatus commented 1 year ago

This still seems to be a problem. Tried installing Zinit on a fresh MacOS through homebrew. It installed v5.9.0 and I'm still getting this error when opening a new terminal session: cp: /opt/homebrew/opt/zinit/doc/zinit.1: No such file or directory. Happening on MacOS Ventura 13.1. Doesn't happen if I install Zinit through the recommended automatic curl command.

jdatskuid commented 1 year ago

I also encountered this issue with a fresh install on a brand new Macbook. I can confirm that I installed version 3.9.

@aov-mx provided a very helpful fix. For Mac users out there, the flag --path might not work, but you can use -w instad:

ln -s "$(man -w zinit)" "$(brew --prefix)/opt/zinit/doc/zinit.1"
henryhchchc commented 1 year ago

This also happens with nix installation.

cp: cannot stat '~/.nix-profile/share/zinit/doc/zinit.1': No such file or directory
ethnh commented 2 weeks ago

@alichtman I see my PR had already been merged & unmerged before why'd u undo this change before ?

ethnh commented 2 weeks ago

@psprint also thx for your work though love zinit :grin: