diff --git a/babeldoc/const.py b/babeldoc/const.py index 84bc173..0adb68b 100644 --- a/babeldoc/const.py +++ b/babeldoc/const.py @@ -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"],