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

[bug]: Wrong binary is downloaded on a mac for eza-community/eza instead of erroring #575

Open
1 task done
jankatins opened this issue Sep 8, 2023 · 6 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@jankatins
Copy link
Contributor

jankatins commented Sep 8, 2023

What happened?

The ghr for eza-community/eza installs a windows binary on my (intel) mac.

https://github.com/eza-community/eza/releases/tag/v0.11.0 contains:

aarch64-unknown-linux-gnu-eza
x86_64-pc-windows-gnu-eza.exe
x86_64-unknown-linux-gnu-eza

So the real problem is that it wrongly tries to download something instead of erroring out as there is no relevant item to download :-(

(I also opened a upstream feature request to provide mac binaries, but I guess this part is still a zinit bug)

Steps to reproduce

.zshrc:

zinit light-mode depth"1" for \
  @zdharma-continuum/zinit-annex-binary-symlink \
  @zdharma-continuum/zinit-annex-bin-gem-node \
  @zdharma-continuum/zinit-annex-default-ice \
  @zdharma-continuum/zinit-annex-patch-dl \
  @zdharma-continuum/zinit-annex-readurl
zinit default-ice --quiet as'null' from"gh-r" lbin'!' lucid nocompile completions
zinit lbin'!**/eza' for @eza-community/eza

Relevant output

λ  exec zsh

Downloading eza-community/eza…


(Requesting `x86_64-pc-windows-gnu-eza.exe'…)
########################################################################################################################################################################### 100.0%
[ziextract] Unpacking the files from: `x86_64-pc-windows-gnu-eza.exe'
chmod: --: No such file or directory
→zinit-extract:2: command not found: cygpath
→zinit-extract:2: exec format error: ./x86_64-pc-windows-gnu-eza.exe
[ziextract] Error: extraction of the archive `x86_64-pc-windows-gnu-eza.exe' had problems.

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

xterm-256color (wezterm)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jankatins jankatins added the bug Something isn't working label Sep 8, 2023
@jankatins jankatins changed the title [bug]: Wrong binary is downloaded on a mac for eza-community/eza [bug]: Wrong binary is downloaded on a mac for eza-community/eza instead of erroring Sep 8, 2023
@jankatins
Copy link
Contributor Author

And I wrote this exact issue report already a few month back: #295 -> closing this one...

@vladdoster
Copy link
Member

@jankatins,

I think this would be useful.

@jankatins
Copy link
Contributor Author

jankatins commented Jan 28, 2024

Just FYI: still running into this...

λ  uname
Darwin

λ  exec zsh

==> Downloading eza-community/eza
==> Requesting eza.exe_x86_64-pc-windows-gnu.tar.gz
################### 100.0%
[ziextract] Unpacking the files from: `eza.exe_x86_64-pc-windows-gnu.tar.gz'
[ziextract] Successfully extracted and assigned +x chmod to the file: eza.exe.
Error: linkbin: lbin ice (**/eza) did not match any files

@jankatins
Copy link
Contributor Author

Another package: no mac binary in the github release, so it ends up with linux :-(

λ  exec zsh

==> Downloading aristocratos/btop
==> Requesting btop-x86_64-linux-musl.tbz
#################### 100.0%
[ziextract] Unpacking the files from: `btop-x86_64-linux-musl.tbz'
[ziextract] Successfully extracted and marked 4 executable the appropriate files (btop, install.sh, setuid.sh, uninstall.sh) contained in `btop-x86_64-linux-musl.tbz'.
==> linkbin: Created btop soft link & set +x on the btop binary

λ  uname -o
Darwin

@vladdoster
Copy link
Member

vladdoster commented Feb 3, 2024

@jankatins

zinit tests hit the issue relatively often where the projects latest release assets lack a os/arch until the maintainer completes building them which can take days/weeks or maybe support changes, etc.

so, does zinit try older releases if no ver ice is specified or fail outright? because btop has a macos build in previous release.

@jankatins
Copy link
Contributor Author

Personally I would like it to fail. #295 has an idea how to make this more reliable (first removing "known not working" downloads and then apply the heuristic to the leftover downloads)

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

No branches or pull requests

2 participants