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]: Comparison introduced in #21 does not work in current version of zinit #24

Open
lhernanz opened this issue Aug 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@lhernanz
Copy link

Describe the bug

The change introduced at #21 does not work in the current version of zinit. As a result, the zinit-install.zsh script is not loaded when it should and the annex-readurl plugging does not work as the required .zinit-download-file-stdout function has not been loaded. This bug is not related to the OS, nor the term that you are using.

Steps to reproduce

  1. Enable the zinit-annex-readurl plugin
  2. Try to download the terraform command by using the snippet in the official documentation
  3. You will get the following message

za-readurl-preinit-handler:108: command not found: .zinit-download-file-stdout

  1. Terraform is not downloaded

Expected behavior

There should not be any error message and terraform should be downloaded.

Screenshots and recordings

No response

Operating System & Version

linux-gnu | ubuntu | x86_64 | x86_64 | x86_64 x86_64

Zsh version

zsh 5.8.1

Terminal emulator

xterm-kitty

If using WSL on Windows, which version of WSL

None

Additional context

This comparison shows up several times in the zinit code. The right version of the code seems to be the following:

(( ${+functions[.zinit-setup-plugin-dir]} )) || builtin source ${ZINIT[BIN_DIR]}"/zinit-install.zsh"

@lhernanz lhernanz added the bug Something isn't working label Aug 13, 2023
@FoxBuru
Copy link

FoxBuru commented Oct 12, 2023

I've hit this very same issue on macOS - arm64, zsh 5.9. Using the snippet provided above removed the errors and allowed to download the proper asset.

@kxalex
Copy link

kxalex commented Jun 26, 2024

I have the same issue. Created PR which needs to be reviewed and merged.

#25

@psprint please take a look at the PR

@lhernanz lhernanz changed the title [bug]: Comparion introduced in #21 does not work in current version of zinit [bug]: Comparison introduced in #21 does not work in current version of zinit Jun 26, 2024
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

3 participants