The installation shell command on Passerine's website doesn't work.
tsklxiv opened this issue · 10 comments
The problem
The installation shell command on the Passerine's website, which is:
sh <(curl -sSf https://www.passerine.io/install.sh)
Doesn't work. Running it on every shell I have tested (bash
and zsh
) will cause the following error:
Welcome to Passerine!
This script will download and install the official compiler and
interpreter for the Passerine programming language, and its package
manager and CLI, Aspen.
The Aspen home, registry, and bin directories are:
/home/firefly/.aspen
/home/firefly/.aspen/registry
/home/firefly/.aspen/bin
This can be modified with the ASPEN_HOME environment variable.
The bin directory will then be added to your PATH environment
variable by modifying the the profile files located at:
/home/firefly/.bash_profile
/home/firefly/.profile
Would you like to proceed with the installation? (y/N)
/proc/self/fd/15: 48: read: Illegal option -n
Installation aborted.
How to fix
The following shell command can be replaced with this one:
curl -sSf https://www.passerine.io/install.sh -o install.sh; chmod +x install.sh; bash install.sh; rm install.sh
This will install the installation shell file and put it in the install.sh
file, then we will change its permission to be executable, then run it with bash
, and finally remove install.sh
.
Thanks for taking the time to file this issue! Does switching to the following work?
bash <(curl -sSf https://www.passerine.io/install.sh)
I think the issue has to do with the fact that the script uses some bashisms even though it's marked as being a pure sh
script. I'd prefer to fix the root of the issue (e.g. the fact that the read -n
option may not be available in all shells). Ideally, the install script should just be:
curl -sSf https://www.passerine.io/install.sh | sh
Have a nice day :)
I have tested two of your shell commands on both bash
and zsh
. The first one works well, but not the second one.
I found a specification of the standard sh
shell. More specifically, there's this manual page on read
. The installation script has the following line:
read -p "> " -n 1 -r
Both the -p
flags and -n
flags are bashisms; only the -r
is described by the specification itself. This line should be switched to:
printf "> "
read -r
Which should be compatible with standard sh
. I'll make this change soon, for now just use:
bash <(curl -sSf https://www.passerine.io/install.sh)
I updated the script in:
Let me know if this new version works with the following command:
sh <(curl -sSf https://www.passerine.io/install.sh)
I have tested it on both bash
and zsh
, and unfortunately, it is another error.
Welcome to Passerine!
This script will download and install the official compiler and
interpreter for the Passerine programming language, and its package
manager and CLI, Aspen.
The Aspen home, registry, and bin directories are:
/home/firefly/.aspen
/home/firefly/.aspen/registry
/home/firefly/.aspen/bin
This can be modified with the ASPEN_HOME environment variable.
The bin directory will then be added to your PATH environment
variable by modifying the the profile files located at:
/home/firefly/.bash_profile
/home/firefly/.profile
Would you like to proceed with the installation? (y/N)
> /proc/self/fd/17: 49: read: arg count
Installation aborted.
Hi, sorry for late reply, here is my system information that I think is necessary:
OS: Pop!_OS 21.04 x86_64
bash version: 5.1.4(1)-release
zsh version: 5.8
Sorry for the late reply, thanks for your OS information. It seems like POSIX-compliant read
requires a variable to read into; the default REPLY
used by most shells is not part of the standard.
I've updated the shell script, let me know if it works for you now.
Awesome! Thanks for taking the time to file this report, I'm glad we were able to get it working. Let me know if you run into any more issues, closing this issue for now!