docs/Makefile: pa11y-install check doesn't detect already-installed pa11y
Metadata
Current evaluation
Closed as stale with no linked fix; the faulty pa11y-install check continues to reinstall pa11y instead of detecting the existing executable.
Resolution: closed stale
Reason: The issue was closed as stale without a linked resolving PR, commit, or maintainer explanation, and the reported bug remains unresolved.
Evaluated by: mr-cal-bot
No scores available.
Issue body
🤖 [BEEP BOOP, A BOT WROTE THIS COMMENT - Claude Sonnet 5, GitHub Copilot CLI]
Found while running the `update-starbase` sync into `canonical/imagecraft` (surfaced by a Copilot code review on the resulting merge PR, https://github.com/canonical/imagecraft/pull/402).
In `docs/Makefile`:
```make
PA11Y_CMD ?= $(DEV_DIR)/node_modules/pa11y/bin/pa11y.js --config $(DEV_DIR)/pa11y.json
...
pa11y-install:
@command -v $(PA11Y_CMD) >/dev/null || { \
```
`PA11Y_CMD` includes CLI arguments (`--config ...`), so `command -v $(PA11Y_CMD)` effectively runs `command -v .../pa11y.js --config .../pa11y.json`, which never resolves to an existing command (since `command -v` only takes a single command name/path, and the extra argument makes the check always fail). As a result, `pa11y-install` reinstalls pa11y on every invocation rather than skipping when it's already present.
Suggested fix: check the underlying executable path directly, e.g. `test -x $(DEV_DIR)/node_modules/pa11y/bin/pa11y.js` (or split the command name out of `PA11Y_CMD` before checking), rather than passing the whole `PA11Y_CMD` value (including arguments) to `command -v`.
Since this file is Starbase-owned and taken verbatim by child repositories, the fix belongs here rather than being patched locally downstream.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Closed as stale with no linked fix; the faulty pa11y-install check continues to reinstall pa11y instead of detecting the existing executable. | |
| stealth/space-bunny-alpha | — | closed stale | Closed as stale with no linked fix; the pa11y-install detection bug remains unresolved in docs/Makefile. | |
| stealth/space-bunny-alpha | — | closed stale | Closed as stale with no linked fix; the pa11y-install check bug reported during canonical/imagecraft#402 remains unresolved. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and resolved. The pa11y-install Makefile target was fixed to correctly detect existing installations. The flawed command -v check was replaced with a direct executable path verification, preventing unnecessary reinstallations. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
0
Complexity:
10
Confidence:
90
Support Request:
0
|
needs triage | Bug in docs/Makefile where pa11y-install target passes arguments to command -v, causing unnecessary reinstallation. Currently unlabelled and awaiting triage. |
Update history
| Date | Change |
|---|---|
| closed | |
| created |
Related work
-
Related To:
canonical/imagecraft#402
(confidence 100%)
The Imagecraft sync PR surfaced the bug during code review but did not resolve it.
Related issues
No related issues found above the similarity threshold.