-
Notifications
You must be signed in to change notification settings - Fork 159
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
Shellcheck does not allow for shebangs with a space #47
Comments
Do we have a script with a space after the shebang somewhere? |
Not in this repo maybe, but if I try to use this hook in a repo it will not work unless removing the space. |
Ohhh, I think I misunderstood. What you're saying is that the regex we use to identify shell scripts is what would need to be fixed? |
Yep indeed, the regex needs to option to allow a space between right after the bang symbol:
|
Understood! And, indeed, spaces after shebang are allowed, as you mentioned. Would you be up for a PR to tweak the regex? |
Yeah sure, do you know what format the regex is? I tried it on regexr but it didn't validate. Maybe its perl regex? |
It's grep format: https://stackoverflow.com/a/4192817/483528. |
The custom regex check will fail if the shebang is in the format of
#! /usr/bin/bash
and only work when removing the space e.g#!/usr/bin/bash
.Spaces in shebangs are valid.
The text was updated successfully, but these errors were encountered: