fix: npm 安装后增加 command -v 验证,更新 Claude Code FAQ 为原生安装器说明
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 37s
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 37s
This commit is contained in:
10
setup.sh
10
setup.sh
@@ -393,8 +393,14 @@ install_tool() {
|
||||
echo -e " 执行: ${CYAN}$install_cmd${NC}"
|
||||
if eval "$install_cmd"; then
|
||||
hash -r 2>/dev/null || true
|
||||
success "$tool_name 安装成功!"
|
||||
return 0
|
||||
local tool_cmd=$(get_tool_cmd "$tool_num")
|
||||
if command -v "$tool_cmd" >/dev/null 2>&1; then
|
||||
success "$tool_name 安装成功!"
|
||||
return 0
|
||||
else
|
||||
warning "$tool_name 可能已安装,但需要重新打开终端才能生效"
|
||||
return 0
|
||||
fi
|
||||
else
|
||||
error "$tool_name 安装失败"
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user