Backport #34035 by charles7668
Close#34022 , #33550
This error message always appears when using the `check-attr` command,
even though it works correctly.
The issue occurs when the stdin writer is closed, so I added a special
case to handle and check the error message when the exit code is 1.
Co-authored-by: charles <30816317+charles7668@users.noreply.github.com>