Skip to content

✨ feat(mq-run): add helpful error messages for uninstalled official tools#1812

Closed
harehare wants to merge 2 commits into
mainfrom
feat/official-tool-not-found-error
Closed

✨ feat(mq-run): add helpful error messages for uninstalled official tools#1812
harehare wants to merge 2 commits into
mainfrom
feat/official-tool-not-found-error

Conversation

@harehare
Copy link
Copy Markdown
Owner

  • Add official_tool_description() to map official tool names to descriptions
  • Add is_official_tool() to detect official mq tools
  • Add official_tool_not_found_error() to generate actionable install hints
  • Show mq update <tool> hint when mq-update is installed, otherwise show full install steps
  • Add tests for all new functions

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves mq-run CLI handling for missing official external tools by detecting known tool names and returning miette errors with installation/update hints.

Changes:

  • Adds helper functions for official tool descriptions and official-tool detection.
  • Adds actionable missing-tool errors that suggest mq update <tool> when available.
  • Adds unit tests for the new helper behavior.

Comment thread crates/mq-run/src/cli.rs Outdated
- Add `official_tool_description()` to map official tool names to descriptions
- Add `is_official_tool()` to detect official mq tools
- Add `official_tool_not_found_error()` to generate actionable install hints
- Show `mq update <tool>` hint when mq-update is installed, otherwise show full install steps
- Add tests for all new functions
@harehare harehare force-pushed the feat/official-tool-not-found-error branch from 0365640 to 1ee4a0b Compare May 31, 2026 05:56
… hint

`which("mq-update")` only searches PATH, so tools installed in
~/.local/bin (the supported external-subcommand directory) were not
detected. Extracted `is_mq_update_available()` that checks PATH first
and then `~/.local/bin` with executable-bit validation, so the concise
`mq update <tool>` hint is shown whenever mq-update is reachable.
@harehare harehare force-pushed the feat/official-tool-not-found-error branch from 1ee4a0b to fa12d84 Compare May 31, 2026 07:15
@harehare harehare closed this May 31, 2026
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.

2 participants