fix: rtk init 用 yes 管道自动确认,消除手动按 Enter

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-05-28 15:31:59 +08:00
parent ea0552be79
commit b892ee6e65

View File

@@ -674,8 +674,8 @@ CARGO_NET_GIT_FETCH_WITH_CLI=true cargo install --git https://github.com/rtk-ai/
}
}
# rtk init -g安装 Claude Code PreToolUse hook幂等
Invoke-WSL ". ~/.cargo/env 2>/dev/null; rtk init -g --auto-patch 2>/dev/null || true" -IgnoreError | Out-Null
# rtk init -g安装 Claude Code PreToolUse hook幂等yes 管道自动确认所有提示
Invoke-WSL ". ~/.cargo/env 2>/dev/null; yes | rtk init -g --auto-patch 2>/dev/null || true" -IgnoreError | Out-Null
Write-OK "rtk hook 已注册 (rtk init -g),重启 Claude Code 后生效"
# ══════════════════════════════════════════════════════════════