zdharma-continuum / zinit-annex-readurl

Other
5 stars 7 forks source link

[bug]: Comparison introduced in #21 does not work in current version of zinit #24

Open lhernanz opened 11 months ago

lhernanz commented 11 months ago

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

  4. 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"

FoxBuru commented 9 months ago

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 commented 3 weeks ago

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

https://github.com/zdharma-continuum/zinit-annex-readurl/pull/25

@psprint please take a look at the PR