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

Don't crash out on OSErrors in subprocess calls #1364

Merged
merged 1 commit into from Mar 12, 2020

Conversation

asottile
Copy link
Member

Resolves #1350

the output is a little non-ideal (repeated messages) but I can't think of a way to do this otherwise, looking at the shebang doesn't necessarily help (it could be an ELF binary, or a malformed ELF binary, or any other number of issues)

$ pre-commit run wat --all-files
wat......................................................................Failed
- hook id: wat
- exit code: 1

[Errno 8] Exec format error: '/home/asottile/workspace/pre-commit/t.sh'
[Errno 8] Exec format error: '/home/asottile/workspace/pre-commit/t.sh'

@asottile asottile merged commit 74c582f into master Mar 12, 2020
@asottile asottile deleted the exec_error_no_shebang branch March 12, 2020 18:15
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.

"script" language without a shebang causes unexpected OSError
1 participant