Skip to content

Commit

Permalink
fix: Add check for babeldoc/const.py existence
Browse files Browse the repository at this point in the history
  • Loading branch information
awwaawwa committed Mar 2, 2025
1 parent dda6e74 commit cc311ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion babeldoc/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def get_cache_file_path(filename: str, sub_folder: str | None = None) -> Path:
git_path = shutil.which("git")
if git_path is None:
raise FileNotFoundError("git executable not found")

if not (Path(__file__).resolve().parent / "babeldoc" / "const.py").exists():
raise FileNotFoundError("babeldoc/const.py not found")
WATERMARK_VERSION = (
subprocess.check_output( # noqa: S603
[git_path, "describe", "--always"],
Expand Down

0 comments on commit cc311ac

Please sign in to comment.