Skip to content

Commit

Permalink
Merge pull request #4 from agoloborodko/origin/release_0_5_1
Browse files Browse the repository at this point in the history
HOTFIX: fixed an error when trying to write non-utf file into markdown
  • Loading branch information
agoloborodko authored Oct 14, 2024
2 parents 96ca421 + f19ff51 commit 3335251
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/reposnap/core/markdown_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def _write_file_contents(self, files: List[Path]) -> None:
self.logger.debug(f"File not found: {file_path}. Skipping.")
continue

self._write_file_content(file_path, relative_path.as_posix())
try:
self._write_file_content(file_path, relative_path.as_posix())
except UnicodeDecodeError as e:
self.logger.error(f"UnicodeDecodeError for file {file_path}: {e}")


def _write_file_content(self, file_path: Path, relative_path: str) -> None:
"""
Expand Down

0 comments on commit 3335251

Please sign in to comment.