fix(cli): keep diagnostics on stderr for --json commands (#2522)

This commit is contained in:
James Russo
2026-07-16 09:14:39 -04:00
committed by GitHub
parent 5e78a29af3
commit d92d1d4f51
5 changed files with 37 additions and 19 deletions
+10 -7
View File
@@ -219,15 +219,18 @@ export function showTelemetryNotice(): boolean {
config.telemetryNoticeShown = true;
writeConfig(config);
console.log();
console.log(` ${c.dim("Hyperframes collects anonymous usage data to improve the tool.")}`);
console.log(` ${c.dim("File paths and composition content are never collected.")}`);
console.log(
// stderr, not stdout: this first-run disclosure is not gated by --json (the
// guard in cli.ts filters by command only), so a stdout banner would corrupt
// the JSON envelope of the very first `check --json` / `info --json` etc.
console.error();
console.error(` ${c.dim("Hyperframes collects anonymous usage data to improve the tool.")}`);
console.error(` ${c.dim("File paths and composition content are never collected.")}`);
console.error(
` ${c.dim("If you sign in to HeyGen, your account (email, or username) is linked to your usage.")}`,
);
console.log();
console.log(` ${c.dim("Disable anytime:")} ${c.accent("hyperframes telemetry disable")}`);
console.log();
console.error();
console.error(` ${c.dim("Disable anytime:")} ${c.accent("hyperframes telemetry disable")}`);
console.error();
return true;
}