-
Notifications
You must be signed in to change notification settings - Fork 848
Stack error re dash shell on Ubuntu 22 #5888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Not exactly true. The script uses But stack invokes via Line 665 in 8ff10c2
I don't know if there is a reliable way to respect the shebang across platforms. |
A workaround is to make the script posix compatible. I can do that and upload the script again. |
Run this to update: curl --proto '=https' --tlsv1.2 -sSf https://www.haskell.org/ghcup/sh/hooks/stack/ghc-install.sh > ~/.stack/hooks/ghc-install.sh This is my tests:
|
Yes, dash scripts need to be POSIX compatible. Ubuntu moved /bin/sh to
dash at Ubuntu 6 and we are now at 22. Why has nobody else ever seen
this issue? Odd.
…On 29/09/2022 4:05 pm, Julian Ospald wrote:
A workaround is to make the script posix compatible. I can do that and
upload the script again.
—
Reply to this email directly, view it on GitHub
<#5888 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6S56ZAW2JEOVLY626DWR3WAUWTDANCNFSM6AAAAAAQYNERWE>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Did you follow my instructions? |
I am going to close this issue here because commits have been made to the GHCup repository on GitLab to resolve the issue: https://gitlab.haskell.org/haskell/ghcup-hs/-/commit/9902adab6d83e24106edf5ff804fbd60a563b765. |
Please use the following schema for your bug report:
General summary/comments (optional)
Stack fails on shell script ghc-install,sh because it uses set -euo pipefile and the script uses #!/bin/sh. Sh has been linked to dash for a long time in Ubuntu and pipefile is not supported in dash.
Steps to reproduce
Run stack build on any project.
Expected
Should run correctly without error.
Actual
Failure as follows:
$ stack build
/home/acb/.stack/hooks/ghc-install.sh: 6: set: Illegal option -o pipefail
GHC install hook exited with code: 2
Stack version
Method of installation
The text was updated successfully, but these errors were encountered: