Skip to content

Commit

Permalink
πŸ› Fix: make external paths relative to confdir, not srcdir (#1378)
Browse files Browse the repository at this point in the history
Paths set in the `conf.py` should be relative to it, not to the
`srcdir`.
Note, often `confdir` and `srcdir` are equivalent, but this is not
always the case.
  • Loading branch information
chrisjsewell authored Jan 7, 2025
1 parent 9c5a6db commit 65c9f4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx_needs/external_needs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def load_external_needs(
if os.path.isabs(source["json_path"]):
json_path = source["json_path"]
else:
json_path = os.path.join(app.srcdir, source["json_path"])
json_path = os.path.join(app.confdir, source["json_path"])

if not os.path.exists(json_path):
raise NeedsExternalException(
Expand Down

0 comments on commit 65c9f4d

Please sign in to comment.