Skip to content

fix: detect broken qmd installs and surface actionable errors#6

Merged
notkurt merged 1 commit intomainfrom
fix/qmd-health-check
Mar 18, 2026
Merged

fix: detect broken qmd installs and surface actionable errors#6
notkurt merged 1 commit intomainfrom
fix/qmd-health-check

Conversation

@notkurt
Copy link
Owner

@notkurt notkurt commented Mar 18, 2026

Summary

  • checkQmd() now verifies qmd can actually execute (not just that the shim exists on PATH) by running qmd collection list as a health check
  • Detects "Module not found" errors from broken bun global installs where the build step didn't run, and surfaces actionable fix instructions (cd <pkg> && bun run build or --force reinstall)
  • installQmd() auto-attempts the build step as recovery when it detects a broken install
  • createCollection() now returns { ok, reason } instead of boolean, so ghost enable can display the actual failure reason

Test plan

  • All 223 existing tests pass
  • Verify on a repo with a broken qmd install that the new messaging appears
  • Verify ghost enable -f auto-recovers by running the build step

🤖 Generated with Claude Code

The qmd binary shim can exist on PATH while the actual module is missing
(bun install -g from GitHub doesn't always run the build step). Previously
this silently passed dependency checks then failed at collection creation
with no useful error message.

Now checkQmd() verifies qmd can actually execute, not just that the shim
exists. When a broken install is detected:
- printDepsReport shows fix instructions (cd <pkg> && bun run build)
- installQmd auto-attempts the build step as recovery
- createCollection returns the actual error reason for display

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@notkurt notkurt merged commit dd75405 into main Mar 18, 2026
2 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.

1 participant