🐛 fix(spx): GITEA_TOKEN 只发给 tea 登录过的 host,origin 不在 tea 里时直接报错

This commit is contained in:
cruldra committed 2026-10-19 08:50:20 +11:00
1 parent e6d086d821
commit 9c7c9d8636
6 files changed
+43 -25

No files matched your search

+2 -1
View File
@@ -111,7 +111,8 @@ func buildRootCmd(open forgeOpener) *cobra.Command {
Short: "superpowers-vscode 工作流 CLI(Gitea / GitHub 薄包装)",
Long: "spx 为 cc/codex agent 在 superpowers-vscode 工作流里提供确定性的工单 / PR 操作。\n" +
"按 git origin 的 host 选仓库:github.com 走 GitHub(token 取自 `gh auth token`),\n" +
"其它 host 走 Gitea(token 取自 ~/.config/tea/config.yml 里同 host 的 login,回退 GITEA_TOKEN)。",
"其它 host 走 Gitea(必须先 `tea login add` 过这个 host,token 取自 ~/.config/tea/config.yml 里同 host 的 login,\n" +
"该 login 没存 token 时才用 GITEA_TOKEN 补上;GITEA_TOKEN 不会发给 tea 没登录过的 host)。",
SilenceUsage: true,
SilenceErrors: false,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {