Skip to content

fix(output): avoid blank tee hint lines - #4166

Closed
Ha1baraA11 wants to merge 1 commit into
rtk-ai:developfrom
Ha1baraA11:codex/fix-empty-tee-hint
Closed

Ha1baraA11 wants to merge 1 commit into
rtk-ai:developfrom
Ha1baraA11:codex/fix-empty-tee-hint

Conversation

@Ha1baraA11

@Ha1baraA11 Ha1baraA11 commented Sep 21, 2026 •

Copy link
Copy Markdown

Summary

  • Avoid emitting a leading blank line when a filtered command has no body but does have a tee hint.
  • Add a regression test for the shared guarded-emission path.

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk <command> output inspected
  • cargo fmt --all -- --check, cargo test --bin rtk, and Clippy pass.
  • cargo test --tests has two existing develop-baseline Git-output assertion failures unrelated to this change.

Fixes #4159

@CLAassistant

CLAassistant commented Sep 21, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@KuSh

KuSh commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this fix. The empty-body case is now handled on develop by #4154 (merged 2026-10-09), which reworked emit_guarded so that with no filtered text the recovery hint is printed alone, without a blank line above it. Develop also carries a regression test for exactly this case (empty_body_with_hint_prints_the_hint_alone in src/core/runner.rs). If I missed something this PR covers, please comment or reopen.

@KuSh KuSh closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

emit_guarded prints a stray leading blank line when the filtered body is empty and a tee hint follows

3 participants