Skip to content

fix(sphinx): prefix sphinx binary paths with ./ in run script (#4201) - #4261

Merged
aignas merged 3 commits into
bazel-contrib:mainfrom
kaycebasques:4201
Oct 14, 2026
Merged

aignas merged 3 commits into
bazel-contrib:mainfrom
kaycebasques:4201

Conversation

@kaycebasques

Copy link
Copy Markdown
Collaborator

When the sphinx binary target is in the root package, its short_path contains no directory separator. Executing it via env in the .run script searches $PATH instead of the current directory and fails with No such file or directory.

Prefix %SPHINX_RUNFILES_PATH% and %SPHINX_EXEC_PATH% with ./ in sphinx_run_template.sh so env resolves the binary relative to the working directory.

Fixes #4201

…contrib#4201)

When the sphinx binary target is in the root package, its short_path
contains no directory separator. Executing it via `env` in the `.run`
script searches `$PATH` instead of the current directory and fails with
`No such file or directory`.

Prefix `%SPHINX_RUNFILES_PATH%` and `%SPHINX_EXEC_PATH%` with `./` in
`sphinx_run_template.sh` so `env` resolves the binary relative to the
working directory.

Fixes bazel-contrib#4201
@aignas
aignas added this pull request to the merge queue Oct 14, 2026
Merged via the queue into bazel-contrib:main with commit ede8f7b Oct 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug sphinxdocs build fails when target is in root dir

2 participants