Skip to content

Commit 70694da

Browse files
betegonclaude
andauthored
fix(help): hide ASCII banner when stdout is not a TTY (#501)
## Summary Suppresses the SENTRY ASCII banner in `sentry` / `sentry help` when stdout is piped or redirected. Interactive terminal sessions still show the banner. ## Changes Wraps the banner output in `printCustomHelp()` with a `process.stdout.isTTY` check. ## Test plan - `bun run dev` → banner visible - `bun run dev | cat` → no banner - `bun test test/lib/help.test.ts` → all 8 tests pass --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a1264b5 commit 70694da

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/lib/help.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ export async function printCustomHelp(): Promise<string> {
109109

110110
const lines: string[] = [];
111111

112-
// Banner with gradient
113-
lines.push("");
114-
lines.push(formatBanner());
115-
lines.push("");
112+
// Skip banner for non-TTY to avoid wasting tokens in agent loops
113+
if (process.stdout.isTTY) {
114+
lines.push("");
115+
lines.push(formatBanner());
116+
lines.push("");
117+
}
116118

117119
// Tagline
118120
lines.push(` ${TAGLINE}`);

0 commit comments

Comments
 (0)