Skip to content
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

Consider packaging the shellcheck binaries #134

Closed
silverwind opened this issue Jan 30, 2025 · 8 comments · Fixed by #135
Closed

Consider packaging the shellcheck binaries #134

silverwind opened this issue Jan 30, 2025 · 8 comments · Fixed by #135

Comments

@silverwind
Copy link

silverwind commented Jan 30, 2025

Currently GitHub release downloads are failing:

$ curl https://github.com/vscode-shellcheck/shellcheck-binaries/releases/download/v0.10.0/shellcheck-v0.10.0.darwin.aarch64.tar.gz
<html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>

I think it would be better to package these archives into the npm package. They are 30MB which is acceptable for an npm package, which would eliminate GitHub as a point of failure.

Even better would be one npm sub-package per platform, like how esbuild does this for example.

@carlocorradini
Copy link
Collaborator

I really don't like include all ShellCheck executables in the npm package.
I see this as a big security threat and a maintenance issue.

@silverwind
Copy link
Author

Hmm yeah it would definitely be much more complex to get such packaging to work. I guess we have to live with GitHub as a point of failure.

@silverwind silverwind closed this as not planned Won't fix, can't repro, duplicate, stale Jan 30, 2025
@carlocorradini
Copy link
Collaborator

The only thing is to add an env variable to specify the shell check binary: you must have downloaded it previously

@silverwind
Copy link
Author

silverwind commented Jan 30, 2025

My use case is to run shellcheck inside a pre-built containers on CI and on developer's machine. I guess I could set something up to have pre-built binaries inside the CI container available and then pass them to this module.

What is the env vars to set binary path? It seem not mentioned in the README.

@carlocorradini
Copy link
Collaborator

It' a possible solution that came to my mind as a workaround

@silverwind
Copy link
Author

silverwind commented Jan 30, 2025

Sure, if it's not too much work, I could accept a SHELLCHECK_BIN_PATH option, that if set, uses shellcheck from there, skipping the download. Should ensure that variable name does not collide with other tooling.

@carlocorradini
Copy link
Collaborator

Done

@carlocorradini
Copy link
Collaborator

@silverwind Update to v3.1.0 and set the environment variable SHELLCHECKJS_BIN to the ShellCheck executable binary path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants