Skip to content

Add --require-env to check-executables-have-shebangs - #1274

Closed
chuckatkins wants to merge 1 commit into
pre-commit:mainfrom
chuckatkins:shebang-require-env
Closed

Add --require-env to check-executables-have-shebangs#1274
chuckatkins wants to merge 1 commit into
pre-commit:mainfrom
chuckatkins:shebang-require-env

Conversation

@chuckatkins

Copy link
Copy Markdown

Adds --require-env

  • Require shebangs to invoke an interpreter through /usr/bin/env (e.g. #!/usr/bin/env python)
  • Off by default

Adds --fix

  • Rewrite existing shebangs to use /usr/bin/env
  • Requires --require-env, since the hook cannot infer an interpreter when no shebang exists
  • Off by default

Fixes #1273.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Optionally let the check-executables-have-shebangs hook require /usr/bin/env

1 participant