iffy / install-nim

Github Action to install Nim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build failing since choosenim 0.8 is available

marcomq opened this issue · comments

Yesterday, a new version of choosenim was released

https://github.com/dom96/choosenim/releases/tag/v0.8.0

Since then, this installer is failing https://github.com/iffy/install-nim/actions/runs/1301742678
It is also failing in other repositories: https://github.com/marcomq/nimview/runs/3787151070

The error message seems to be
sh: 90: SHELL: parameter not set

I guess it is due to choosenim, but I have no idea how to report this as choosenim issue. Maybe you already know what might be wrong and can easily advise some fix in choosenim.

Edit:
There was a build run 2 days ago on the same code that passed:
https://github.com/marcomq/nimview/actions/runs/1298566330/attempts/1
The new attempt based on the previously passed run fails:
https://github.com/marcomq/nimview/actions/runs/1298566330/attempts/2

the error code sh: 90: SHELL: parameter not set should be an env variable missing in a shell script. there is one occurence of $SHELL in choosenim here: https://github.com/dom96/choosenim/blame/3b2e8a0248aa2e2d0cc2e82fc2c9c231ec47f408/scripts/choosenim-unix-init.sh#L90

that line and the surrounding ones are not recent changes but of course it is possible that recent changes in choosenim caused the issue (maybe the issue was always there but that piece of code was not executing before; I guess it depends on the base image for the docker whether or not it defines a $SHELL command). opening a related issue in choosenim repo: dom96/choosenim#274

The confusing thing to me is that SHELL is set. In this failure: https://github.com/iffy/install-nim/runs/3791199717?check_suite_focus=true

You can see that SHELL is /bin/bash. I'll keep digging...

The SHELL error is fixed, but now it's running into this issue: dom96/choosenim#272 I'll leave this issue open until that one is fixed.

The confusing thing to me is that SHELL is set. In this failure: https://github.com/iffy/install-nim/runs/3791199717?check_suite_focus=true

You can see that SHELL is /bin/bash. I'll keep digging...

I think the issue for not seeing SHELL is that in the script the init.sh is executed with sh (instead of bash) and somehow that loses the setting. No idea why, but this is what I gather from a fix that somebody else did with a similar issue (using bash instead of sh): https://github.com/theoremoon/ShellgeiBot-Image/pull/161/files)

anyway I think we should (and will) have also a fix upstream in choosenim.

Version 3.2.2 should fix both issues:

- uses: iffy/install-nim@v3.2.2