fix(skills): Windows 下 python3 硬编码导致 6verity/doctor 失效 - #115
Open
hailuohl wants to merge 2 commits into
Open
Conversation
hailuohl
force-pushed
the
fix/skills-windows-python-compat
branch
from
September 7, 2026 19:35
e578692 to
83d8783
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.
Summary
修复 Windows(原生 Python + Git Bash,无
python3命令)环境下两个质量关卡失效的问题:skills/6verity/scripts/writing_check.shpython3/python任一可用解释器(PYTHON_BIN),heredoc 改用探测结果;两者都缺失时输出明确错误并以退出码 2 退出,而不是python3: command not found。--paper-dir等带值选项位于末尾(缺值)时,原实现shift 2无法消费参数导致while永真刷屏;现在统一报ERROR: <option> requires a value并以退出码 2 退出(新增die_missing_value辅助函数)。skills/doctor/SKILL.mdcheck_cmd函数补显式return 0/return 1——原实现以echo结尾恒返回 0,导致check_cmd python3 || check_cmd python的回退分支永远不执行(Windows 上python明明存在却报 MISS,误导后续安装向导)。PYTHON_BIN执行 heredoc,并在无解释器时显式跳过提示。Get-Command)。python3 / python。行为对比
python3: command not found,验收门禁失效python,完整执行全部检查MISS python3(即使 python 已装),包检测报错MISS python3后回退OK python,包检测完整执行writing_check.sh --paper-dir(缺值)ERROR: --paper-dir requires a value,退出码 2python3)验证
在 Windows 10 + Git Bash(
command -v python3为空、python= 3.12.8)实测:bash -n语法检查通过;writing_check.sh --paper-dir <含 PLACEHOLDER 的测试目录>:探测到python并完整执行,正确输出FAIL: placeholder text remains ...(门禁逻辑生效);writing_check.sh --paper-dir(缺值):立即报错退出(exit=2),不再死循环;MISS python3→OK python (...)回退生效,6 个 Python 包检测全部经python执行;check_cmd的回退失效问题已单独复现确认(函数返回值恒为 0)。备注