Closed adamsmd closed 4 years ago
@adamsmd Thanks for the report! I decided to try getting the script sh
-sane. I want to keep the dependencies for rakubrew as low as possibe (I'd like to keep rakubrew working in a restricted busybox environment with only perl installed).
I'll see if I can get CodeFactor to run shellcheck on those scripts. That should help at least a little with respect to bash-ism creap.
CodeFactor is deployed and configured to check for hidden bash-isms in the scripts. The checker is not perfect, but a good help nonetheless.
I got this too following directions on https://rakubrew.org/:
$ curl https://rakubrew.org/install-on-perl.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1396 100 1396 0 0 15511 0 --:--:-- --:--:-- --:--:-- 15511
sh: 4: set: Illegal option -o pipefail
@rbt This was fixed back in may but isn't deployed yet because the deployment routine is suboptimal. I'm in the process of working out a a way to deploy that doesn't cause delays measured in weeks.
I am not sure whether this issue should be filed against
Raku/rakudobrew.org
orRaku/App-Rakubrew
so let me know if this is the wrong place.Problem
The current installation instructions say to run the following command:
However, this results in the following error:
Cause
While on many systems
sh
isbash
, on Ubuntu, by default,sh
isdash
notbash
. Sinceinstall-on-perl.sh
usesset -o pipefail
, which is a bash-ism, this fails when run underdash
.Possible solutions
Either (1) remove all bash-isms from
install-on-perl.sh
or (2) update the installation instructions to say to usebash
instead ofsh
.I recommend option (2) in case there are other bash-isms or bash-isms creap into
install-on-perl.sh
.