-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
set -euo pipefail no longer works with latest shellcheck-alpine docker image #1489
Comments
I wonder if something happened with #1480 |
ShellCheck is correct. pipefail is not a valid shell options for sh scripts. Here's what happens if you try to run your script on Debian based distributions:
Your script does not do anything that warrants setting the pipefail option, so you can consider just removing it. If you want to keep it, set the shebang to a shell that supports pipefail such as bash or ksh. |
Can you please tell me the syntax for the shebang for bash? Or what is the path for it in the container? I have tried the following:
However all of them give on of the following errors:
|
Oh, you want to both check and run the scripts inside the alpine-linux container. Are these scripts intended to ever be runnable outside alpine-linux? If so, the best way may be to install Bash with If you don't need them to be runnable outside alpine-linux, you can ignore the issue with a comment saying that you already know that Optimally you would just have used |
I am using this container like so:
The docker-compose file: ---
version: '2.0'
services:
shellcheck:
image: koalaman/shellcheck-alpine:latest
volumes:
- ".:/build"
working_dir: /build Is there anyway I can install I have tried updating the compose file to override the command but haven't found a working solution. command: /bin/sh -c "apk add bash" && /bin/shellcheck command: apk add bash && /bin/shellcheck
entrypoint: /bin/sh -c command: /bin/sh -c "apk add bash" && /bin/shellcheck
entrypoint: /bin/sh -c No matter what I do, I keep getting this error:
|
That error is telling you it can't find |
For bugs
This was working until a few days ago but has suddenly started to give this error. If we go back and try the same script with v0.6.0 it works as expected.
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
No issues detected
The text was updated successfully, but these errors were encountered: