Skip to content

Commit e85ec49

Browse files
igerberclaude
andcommitted
ci: replace pipefail-unsafe pip-show|head with importlib.metadata
The previous `pip show pydata-sphinx-theme | head -3` would SIGPIPE under bash -o pipefail (GitHub Actions default): head closes the pipe after 3 lines, pip show exits non-zero, the step fails despite a successful install. Replace with a single Python invocation against importlib.metadata that prints just the resolved version. No pipe involved, no broken exit codes, and the output is what we actually wanted to log. Verified locally: exit 0, prints `pydata-sphinx-theme 0.16.1`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4ff5dad commit e85ec49

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/docs-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,7 @@ jobs:
131131

132132
- name: Confirm pydata-sphinx-theme version
133133
# Surface the resolved version in the log for future debugging.
134-
run: pip show pydata-sphinx-theme | head -3
134+
# Avoid `pip show ... | head -3`: `head` closes the pipe after 3
135+
# lines and `pip show` exits non-zero under bash -o pipefail
136+
# (GitHub Actions default), failing the step despite a clean install.
137+
run: python -c "import importlib.metadata as m; print('pydata-sphinx-theme', m.version('pydata-sphinx-theme'))"

0 commit comments

Comments
 (0)