-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
For new checks and feature suggestions
- https://www.shellcheck.net/ (i.e. the latest commit) currently gives no useful warnings about this
- I searched through https://github.com/koalaman/shellcheck/issues and didn't find anything related
Here's a snippet or screenshot that shows a potential problem:
I've been using unshare in my script's shebangs to sandbox them; however, doing so prevents shellcheck from knowing what shell is being used. For example:
#!/usr/bin/env -S unshare --mount --map-root-user /bin/sh
[...]Here's what shellcheck currently says:
SC1008 (error): This shebang was unrecognized. [...]
Here's what I wanted to see:
It'd be handy if shellcheck could handle unshare inside env -S lines somehow (if reasonable to implement). Alternatively, using --shell or # shellcheck shell=sh solves this issue manually.
Metadata
Metadata
Assignees
Labels
No labels