diff --git a/pre_commit_hooks/detect_aws_credentials.py b/pre_commit_hooks/detect_aws_credentials.py index cab4ca4..b408edd 100644 --- a/pre_commit_hooks/detect_aws_credentials.py +++ b/pre_commit_hooks/detect_aws_credentials.py @@ -44,7 +44,7 @@ def get_aws_secrets_from_json(json_credentials_file: str) -> set[str]: """ aws_credentials_file_path = os.path.expanduser(json_credentials_file) - with open(aws_credentials_file_path) as f: + with open(aws_credentials_file_path, encoding='utf-8') as f: try: data = json.load(f) except json.JSONDecodeError: