tristanisham / zvm

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

Install script doesn't work on Fedora 40 #90

Open chung-leong opened 2 weeks ago

chung-leong commented 2 weeks ago

Describe the bug

cleong@fedora:~$ curl https://raw.githubusercontent.com/tristanisham/zvm/master/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current Dload  Upload   Total   Spent    Left  Speed
100  3947  100  3947    0     0  18416      0 --:--:-- --:--:-- --:--:-- 18358
Installing zvm-linux-amd64.tar in /home/cleong/zvm
wget is installed. Using wget...
Unknown option 'show-progress'
tar: zvm.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
rm: cannot remove 'zvm.tar': No such file or directory

Desktop (please complete the following information):

cleong@fedora:~$ uname -a
Linux fedora 6.8.5-301.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 11 20:00:10 UTC 2024 x86_64 GNU/Linux
chung-leong commented 2 weeks ago

Fedora also uses .bashrc instead of .profile.

tristanisham commented 2 weeks ago

Thanks for taking the time to make this issue. I'll look into it and hopefully have a fix out soon.

i-am-wololo commented 1 week ago

looked into it, you're probably using wget2, which fedora uses by default instead of wget. wget2 doesnt have the --show-progress flag, causing the script to crash. As a quickfix you could tweak the install script a bit to use curl instead of wget

tristanisham commented 1 week ago

Nice find! I think the better solution would be to add a check on the version of wget and if the progress flag isn't supported we can run the equivalent on wget2 or use Curl if it's installed.