fix: make /rtk verify and show actually probe the rtk binary - #1
Open
xelr233 wants to merge 1 commit into
Open
Conversation
verify/show only read the cached probe state, which stays undefined until the first bash call, so an installed rtk was always reported as "not probed yet" (the verify hint even told users to re-run a command that never probes). Force a fresh probe (cache bypass) in both commands and report the resolved path or NOT FOUND. Also fix the npm test script for Node 24 (node --test test/ fails with MODULE_NOT_FOUND) and add command tests covering verify/show probing.
This was referenced Aug 15, 2026
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.
摘要
修复插件识别不到已安装 rtk 的 bug:
/rtk verify与/rtk show之前只读state.rtkResolved缓存(初始undefined),永远输出 "not probed yet",而真正的探测只在tools/pre-execute里发生——用户若从不执行 bash 就永远探测不到。变更
resolveRtk(signal, force=true)绕过 60s 缺失缓存,/rtk verify与/rtk show强制重新探测rtk binary: NOT FOUND on PATHnpm test脚本(Node 24 下node --test test/的 MODULE_NOT_FOUND)测试
node --test test/*.test.js→ 25 pass / 0 fail