Skip to content

fix: avoid false prettier success output - #2410

Closed
jsiu93 wants to merge 1 commit into
rtk-ai:developfrom
jsiu93:fix/prettier-false-success-2395
Closed

jsiu93 wants to merge 1 commit into
rtk-ai:developfrom
jsiu93:fix/prettier-false-success-2395

Conversation

@jsiu93

@jsiu93 jsiu93 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #2395.

Summary

  • keep non-check prettier invocations as passthrough
  • filter only check and list-different invocations
  • avoid printing the success summary when prettier or the package manager fails

Tests

  • cargo fmt --all -- --check
  • cargo test prettier_cmd
  • cargo test --all

@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@jsiu93

jsiu93 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

bump. Still relevant: #2395 is open and develop still routes every prettier invocation (including --version and --write) through the check-mode filter, so it prints "All files formatted correctly" for non-check runs. Branch is conflict-free with current develop, CI green.

@KuSh

KuSh commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

Closing this in favour of #3571, which fixes #2395 the same way (the exit code decides, a failed run is never reported as formatted) while keeping stderr on its own stream, and adds end-to-end tests with real prettier output. Review or comments are welcome on #3571; if the passthrough for non-check invocations is still something you need, please reply here.

@KuSh KuSh closed this Sep 26, 2026
@KuSh KuSh added the duplicate This issue or pull request already exists label Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: rtk prettier prints "All files formatted correctly" when the prettier binary is not installed (and for --version)

2 participants