Open ErikSchierboom opened 1 month ago
Thank you for submitting an issue! :)
Good catch!
The truth is I haven't looked into this script for quite some time, but I guess it should be prioritized ahead of the upcoming release.
Could also be fixed along with this suggestion of yours here 😉
@RickBarretto Hadn't we fixed this at some point? Or am I totally mistaken? I honestly don't remember... lol
I thought this too. I'll have a look on this.
We are so much time without touching this script.
I guess, we need to add tests to this too.
Well, it seems that this script suffered with some regression. I remember my first contribution being add support for MSYS2, and this seems not to be working on Terminal nor MSYS2.
Updates
I discovered why, this is just installing for Linux and Mac on x86 architecture. None of us are using it. Look:
For stable
and latest
I discovered why, this is just installing for Linux and Mac on x86 architecture. None of us are using it.
@RickBarretto But WSL is x86_64
on Linux. It should behave like any other Linux distro. Maybe the detection is wrong?
But WSL is x86_64 on Linux. It should behave like any other Linux distro. Maybe the detection is wrong?
@ErikSchierboom That is the point. Probably the WSL would work fine, but I'm using MSYS2. Unfortunately WSL is to heavy for my laptop, so I don't use it.
I'll have a look
@RickBarretto Seems like this is a general issue with using sh
on Ubuntu: https://kinoshita.eti.br/2016/11/05/checking-the-operating-system-type-in-shell-script.html
Nope, that is not the issue :)
I think the actual issue is this grep
part: grep "browser_download_url.*${1}"
in this command:
downloadUrl=$(curl -s https://api.github.com/repos/arturo-lang/$REPO/releases | grep "browser_download_url.*${1}" | cut -d : -f 2,3 | tr -d \" | head -1)
If I download curl -L -O https://get.arturo-lang.io/latest
, that file is different from https://github.com/arturo-lang/arturo-lang.io/blob/main/installer/nightly.sh
, which does work. Maybe the redirect points to the wrong file?
@ErikSchierboom , thanks a lot for your help.
Just for reference, I read this issue again and I noticed you are using the WSL, I thought this was the new Macs ARM. My bad.
Thanks for sending this news, and also the grep issue.
I'll have a look on it when I come home. :wink:
Well, the commands itself are right... I just ran it manually:
This seems like the script is right, but well, this is installing only for Linux amd64. So, anyway, this will need some update very soon.
What I'll need to check is this:
tar (child): /tmp/tmp.COQGG5lfVc/arturo.tar.gz: Cannot open: No such file or directory
Probably the temporary-directory creator is broken. I'm not sure if I can actually test it, since I don't know if MSYS2 has the same behavior for temp folders. But anyway, I'll try this later and keep you updated. 😉
I still think the problem is with the script download somehow. See:
erik@schierheim:~/exercism$ curl -sSL https://get.arturo-lang.io/latest | grep 'currentOS="Linux"'
erik@schierheim:~/exercism$ curl -sSL https://raw.githubusercontent.com/arturo-lang/arturo-lang.io/main/installer/nightly.sh | grep 'currentOS="Linux"'
linux*) currentOS="Linux" ;;
linux-gnu*) currentOS="Linux" ;;
currentOS="Linux"
I've ran the following on both my mac, WSL machine and some random server on the internet, all with the same result (/latest
) not returning the right version. Maybe someone else can check too?
I'll have a look. I think this is time to a rewrite. We have some problems with those scripts.
1st, to get the download link, this is using head -1
, but if the order changes, everything breaks.
2nd, latest and nightly does the same thing, only changing one variable. This means that any change on the code must reflect in the other one.
Describe the bug The getting started guide suggest using the following bash script to install the latest nightly:
To Reproduce Steps to reproduce the behavior:
curl -sSL https://get.arturo-lang.io/latest | sh
Expected behavior I would have expected the nightly version to be installed. As the file could not be downloaded, I would also expect this to be acknowledged by the script and not print the "Arturo has been successfully installed!" message :)
Desktop (please complete the following information):