-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description
When using relative paths in a configuration file (e.g., path: "../repos/datapipelines"), the paths are resolved relative to the current working directory (CWD) rather than relative to the configuration file's location.
Expected Behavior
Relative paths in the config file should resolve relative to where the config file is located. This is the standard behavior for most tools (e.g., tsconfig.json, pyproject.toml).
Actual Behavior
Paths resolve from CWD, causing "Repository path does not exist" warnings when running from a different directory than expected.
Steps to Reproduce
-
Create config at
/Users/masa/Duetto/repos/gitflow-contractors.yamlwith:repositories: - name: "datapipelines" path: "../repos/datapipelines"
-
Run from
/Users/masa/Projects/gitflow-analytics:uv run -m gitflow_analytics.cli analyze --config /Users/masa/Duetto/repos/gitflow-contractors.yaml --weeks 4
-
Observe warning:
Repository path does not exist: /Users/masa/Projects/repos/datapipelines- Expected path:
/Users/masa/Duetto/repos/datapipelines(relative to config file) - Actual path:
/Users/masa/Projects/repos/datapipelines(relative to CWD)
- Expected path:
Suggested Fix
In config/loader.py, resolve relative repository paths using os.path.dirname(config_file_path) as the base, not os.getcwd().
Environment
- Version: v3.13.13
- Python: 3.13
- OS: macOS