✨ feat(mq-run): add helpful error messages for uninstalled official tools#1812
Closed
harehare wants to merge 2 commits into
Closed
✨ feat(mq-run): add helpful error messages for uninstalled official tools#1812harehare wants to merge 2 commits into
harehare wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
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.
- 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
0365640 to
1ee4a0b
Compare
… 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.
1ee4a0b to
fa12d84
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
official_tool_description()to map official tool names to descriptionsis_official_tool()to detect official mq toolsofficial_tool_not_found_error()to generate actionable install hintsmq update <tool>hint when mq-update is installed, otherwise show full install steps