Skip to content

Conversation

@DimitriPapadopoulos
Copy link
Collaborator

If the exclude-file argument cannot be read, catch the exception and exit properly with a meaningful error message.

Fixes #3687.

If the exclude-file argument cannot be read, catch the exception and
exit properly with a meaningful error message.
Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding some test that these can actually be hit? Makes sure that things like e.strerror actually work in the strings

@DimitriPapadopoulos
Copy link
Collaborator Author

@larsoner Do you think we should exit when a "secondary" file argument is missing, or just ignore the missing file as suggested in #3687 (comment)?

@larsoner
Copy link
Member

Ahh for an --exclude I think it's okay if the file is missing, it shouldn't lead to an error

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 this pull request may close these issues.

BUG: pre-commit hook gets invoked after file deletion and crashes if excluded file does not exist

3 participants