Command hints print to stdout when output is piped
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 77/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
从 packages/cli/src/lib/command.ts 开始,阅读 writeFinalization 如何处理提示和 stdout;然后检查 packages/cli/src/commands/release/propose-version.ts,找出一个会返回提示的命令。确定并实现 stdout 不是 TTY 时应如何处理提示,同时保留交互式输出的现有行为。完成标准是:通过管道传递的 propose-version 输出只包含版本号,其他返回提示的命令也表现一致。
由索引模型根据 Issue 内容生成。
描述
In human output mode, the hint a command returns is written to stdout after the result, even when stdout isn't a TTY. So sentry release propose-version prints the version and then a Detected from git HEAD line. Scripts that capture it get two lines.
writeFinalizationinpackages/cli/src/lib/command.tswrites the hint withwriteFooter(stdout, hint)whenever--jsonisn't set. It never checks whether stdout is a TTY.propose-versionreturns{ hint: "Detected from <source>" }on every path (packages/cli/src/commands/release/propose-version.ts).- Generated build scripts in the
sentry wizardport (getsentry/toolkit#2529) and the Sentry UI snippets (getsentry/sentry#132671) work around it withsentry release propose-version | head -n 1. The pipe hides a failing exit code, soSENTRY_RELEASEends up empty and the next step runs anyway. - It applies to any command that returns a hint, not just
propose-version.
Proposal (approved by @BYK): when stdout isn't a TTY, send hints to stderr, or leave them out.
via @BYK.
--
- 主要语言
- TypeScript
- 星标
- 975
- 派生
- 189
- 平均合并
- 19 小时 57 分钟
- 30 天内合并 PR
- 542
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/toolkit 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
getsentry/toolkit#2583 · 1 条评论 ·
维护者通常 1 天内回复
-
mcp-feedback-pattern
难度 2/5 1-3 小时 新手友好度 74/100
getsentry/toolkit#2458 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/toolkit#2444 · 1 条评论 ·
维护者通常 1 天内回复
-
mcp-feedback-pattern
难度 2/5 1-3 小时 新手友好度 67/100
getsentry/toolkit#2362 · 1 条评论 ·
维护者通常 1 天内回复
-
mcp-feedback-pattern
难度 2/5 1-3 小时 新手友好度 75/100
getsentry/toolkit#2315 · 1 条评论 ·
维护者通常 1 天内回复
查看 getsentry/toolkit 的全部 Issue
相似的 Issue
-
sumHorizontal, maxHorizontal, minHorizontal, allHorizontal, anyHorizontal, struct and argSortBy treat strings as literals instead of column names可能已有人在做 @tomaionescu 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
pola-rs/nodejs-polars#486 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
jaegertracing/jaeger-ui#4853 ·
维护者通常 1 天内回复
-
area/plugins platform/linux reproduced type/bug version/v2
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/opencode#66970 · 3 条评论 ·
维护者通常 1 天内回复
-
area:tui enhancement platform:macos
难度 2/5 1-3 小时 新手友好度 68/100
anthropics/claude-code#112838 ·
-
approved check:passed streams:add
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复