Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pre_commit_hook_ensure_sops/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def check_file(filename):
except ParserError:
# All sops encrypted files are valid JSON or YAML
return False, f"{filename}: Not valid JSON or YAML, is not properly encrypted"
except Exception as e:
return False, f"Exception for file {filename}: {e.__class__.__name__}: {e}"

if 'sops' not in doc:
# sops puts a `sops` key in the encrypted output. If it is not
Expand Down