tristanisham / zvm

zvm (Zig Version Manager) lets you easily install/upgrade between different versions of Zig.
https://www.zvm.app
MIT License
456 stars 31 forks source link

[BUG] Mac OS Sonoma 14.16.1 ERRO failed to download Zig #101

Open v-georg-v opened 1 day ago

v-georg-v commented 1 day ago

Describe the bug 2024/10/13 20:43:56 ERRO failed to download Zig: invalid input: expected a url that started with https://ziglang.org/builds/. Recieved "https://ziglang.org/download/0.13.0/zig-macos-aarch64-0.13.0.tar.xz"

To Reproduce Steps to reproduce the behavior:

  1. Run zvm install 0.13.0 2 Scroll to '....'
  2. See error 2024/10/13 20:43:56 ERRO failed to download Zig: invalid input: expected a url that started with https://ziglang.org/builds/. Recieved "https://ziglang.org/download/0.13.0/zig-macos-aarch64-0.13.0.tar.xz" If you're experiencing a bug, run zvm upgrade. If there's a new version of ZVM, we may have already fixed your bug in a new release :) Otherwise, please report this error as a GitHub issue. https://github.com/tristanisham/zvm/issues/

Expected behavior Gives me error when i am trying to download not master version of zig. master version i install from zvm

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

v-georg-v commented 1 day ago
Screenshot 2024-10-13 at 20 50 42 Screenshot 2024-10-13 at 20 51 47
tristanisham commented 1 day ago

Hey @v-georg-v, thanks for posting this issue. That bug occurs when ZVM tries to install from the official CDN but fails, then attempting to install from one of the two supported mirrors from an invalid URL. I think the current code is too restrictive and didn't account for if the underlying mirror structure changed.

I'm currently out of the country but when I'm back I will update the affected section in install.go.