zdharma-continuum / zinit

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

[bug]: 'gh-r' does not consider older release assets unless explicitly adding `ver' '` ice #403

Open vladdoster opened 1 year ago

vladdoster commented 1 year ago

What happened?

The behavior of the from'gh-r' ice has regressed.

Consider the following example:

ᐳ zi delete --yes nivekuil/rip;
zi for \
    as'null' \
    from'gh-r' \
    lbin'!' \
    nocompile \
    nocompletions \
  @nivekuil/rip;
zi delete --yes nivekuil/rip;
zi for \
    as'null' \
    from'gh-r' \
    lbin'!' \
    nocompile \
    nocompletions \
    ver'0.11.3' \
  @nivekuil/rip

linkbin annex: Removed rip soft link

Done (action executed, exit code: 0)

Downloading nivekuil/rip…
gh-r: failed to find the correct GitHub release asset to download.
No such (plugin or snippet): nivekuil/rip.

Downloading nivekuil/rip…
(Requesting `rip-0.11.3-x86_64-apple-darwin.tar.gz'…)
########################################################################## 100.0%
ziextract: Unpacking the files from: `rip-0.11.3-x86_64-apple-darwin.tar.gz'…
ziextract: Successfully extracted and assigned +x chmod to the file: `rip'.
linkbin annex: Created the rip soft link and set +x on the rip binary

Steps to reproduce

zi delete --yes nivekuil/rip;
zi for \
    as'null' \
    from'gh-r' \
    lbin'!' \
    nocompile \
    nocompletions \
  @nivekuil/rip && \

Only works if you explicitly define the older version (e.g., not latest) with darwin asset

zi delete --yes nivekuil/rip;
zi for \
    as'null' \
    from'gh-r' \
    lbin'!' \
    nocompile \
    nocompletions \
    ver'0.11.3' \
  @nivekuil/rip

Relevant output

No response

Screenshots and recordings

No response

Operating System & Version

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

Zsh version

zsh 5.9.0.1-dev (arm-apple-darwin22.1.0)

Terminal emulator

xterm-kitty

If using WSL on Windows, which version of WSL

No response

Additional context

@yutkat, Is this possibly related to #373?

Code of Conduct