j178 / prek

Resolve relative repo paths from config file directory (#1443)
* fix: resolve relative repo paths from config file directory Relative paths like `../hook-repo` in `.pre-commit-config.yaml` were being resolved against the process's current working directory instead of the directory containing the config file. This broke configs in subprojects that used relative paths to hook repositories. The fix resolves relative repo paths in `Project::from_config_file` right after loading the config, using the config file's parent directory as the base. Fixes #1065 * Minor tweaks --------- Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
Shaan Majid Shaan Majid committed on Jan 22, 2026, 03:05 AM
Showing 3 changed files +144 additions -9 deletions
Browse files at this commit โ†’